找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 68|回复: 7

Nextcloud 私有云在AMH下的配置和规则

[复制链接]

45

主题

218

回帖

591

积分

高级会员

积分
591
发表于 2017-8-1 03:24:34 | 显示全部楼层 |阅读模式
本帖最后由 lovees 于 2017-8-1 09:12 编辑

一直没找到AMH FOR Nextcloud的配置和静态规则,花点时间自己配置了一个
[ol]
  • server
  • {
  •         listen 80;
  •         server_name 你的域名; #server_name end
  • #--------301 BEGIN        
  • if ($server_port = 80) {
  •     return 301 https://$server_name$request_uri;
  •     }
  •     if ($scheme = http) {
  •     return 301 https://$server_name$request_uri;
  •      }
  •     error_page 497 https://$server_name$request_uri;
  • #--------301 END
  •         index index.html index.htm index.php; #index end
  •         set $subdomain '';
  •         root  /home/wwwroot/你自己的空间路径/web$subdomain;
  •         include rewrite/规则.conf; #rewrite end
  •         #error_page
  •         error_page 400 /ErrorPages/400.html;
  •         error_page 403 /ErrorPages/403.html;
  •         error_page 404 /ErrorPages/404.html;
  •         error_page 502 /ErrorPages/502.html;
  •         location ~ /ErrorPages/(400|401|403|404|405|502|503)\.html$
  •         {
  •                 root /home/wwwroot/你自己的空间路径/web;
  •         }
  •     ##############此处注译掉############
  •     #location ~ \.php(?:$|/)
  •         #location ~ .*\.php$
  •         #{
  •         #        fastcgi_pass  unix:/tmp/php-cgi-Aadmin.sock;#注意此处php-cgi-Aadmin.sock 在规则里面需要使用
  •         #        fastcgi_index index.php;
  •         #        include fcgi-host.conf;
  •         #        fastcgi_param DOCUMENT_ROOT  /web$subdomain;
  •         #        fastcgi_param SCRIPT_FILENAME  /web$subdomain$fastcgi_script_name;
  •         #}
  • 省略................}[/ol]复制代码
    静态规则
    [ol]
  •     gzip off;
  •         add_header X-Content-Type-Options nosniff;
  •     add_header X-XSS-Protection "1; mode=block";
  •     add_header X-Robots-Tag none;
  •     add_header X-Download-Options noopen;
  •     add_header X-Permitted-Cross-Domain-Policies none;
  •                
  •         location = /robots.txt {
  •         allow all;
  •         log_not_found off;
  •         access_log off;
  •     }
  •     location = /.well-known/carddav {
  •       return 301 $scheme://$host/remote.php/dav;
  •     }
  •     location = /.well-known/caldav {
  •       return 301 $scheme://$host/remote.php/dav;
  •     }
  •         location / {
  •         rewrite ^ /index.php$uri;
  •     }
  •     location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
  •         deny all;
  •     }
  •     location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
  •         deny all;
  •     }
  •     location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+)\.php(?:$|/) {
  •         fastcgi_split_path_info ^(.+\.php)(/.*)$;
  •         include fcgi-host.conf;
  •                 fastcgi_param DOCUMENT_ROOT  /web$subdomain;
  •         fastcgi_param SCRIPT_FILENAME  /web$subdomain$fastcgi_script_name;
  •         fastcgi_param PATH_INFO $fastcgi_path_info;
  •         fastcgi_param HTTPS on;
  •         #Avoid sending the security headers twice
  •         fastcgi_param modHeadersAvailable true;
  •         fastcgi_param front_controller_active true;
  •         fastcgi_pass  unix:/tmp/php-cgi-Aadmin.sock; 注意此处php-cgi-Aadmin.sock 在规则里面需要使用
  •         fastcgi_intercept_errors on;
  •         fastcgi_request_buffering off;
  •     }        
  •         location ~ ^/(?:updater|ocs-provider)(?:$|/) {
  •    省略................
  •     }        [/ol]复制代码

    详情或直接下载规则请到此:https://www.sxsay.net/787.html
  • 回复

    使用道具 举报

    28

    主题

    267

    回帖

    648

    积分

    高级会员

    积分
    648
    发表于 2017-8-1 08:10:51 | 显示全部楼层
    这个很实用
    回复

    使用道具 举报

    39

    主题

    910

    回帖

    1943

    积分

    金牌会员

    积分
    1943
    发表于 2017-8-1 08:24:23 | 显示全部楼层
    这个好不好用的啊
    回复

    使用道具 举报

    45

    主题

    218

    回帖

    591

    积分

    高级会员

    积分
    591
     楼主| 发表于 2017-8-1 09:11:02 | 显示全部楼层

    流河旱树 发表于 2017-8-1 08:24

    这个好不好用的啊

    测试5次全OK
    回复

    使用道具 举报

    2

    主题

    9

    回帖

    30

    积分

    新手上路

    积分
    30
    发表于 2017-8-1 08:24:00 | 显示全部楼层
    ownCloud 是不是也可以?
    回复

    使用道具 举报

    45

    主题

    218

    回帖

    591

    积分

    高级会员

    积分
    591
     楼主| 发表于 2017-8-1 10:30:52 | 显示全部楼层

    martel 发表于 2017-8-1 10:30

    ownCloud 是不是也可以?

    是的,都差不多!
    回复

    使用道具 举报

    45

    主题

    218

    回帖

    591

    积分

    高级会员

    积分
    591
     楼主| 发表于 2017-8-2 23:18:35 | 显示全部楼层
    手机版我怎么找不到在哪备份通讯录啊?有那位大神知道啊!
    回复

    使用道具 举报

    17

    主题

    298

    回帖

    653

    积分

    高级会员

    积分
    653
    发表于 2017-8-1 10:30:00 | 显示全部楼层
    绑定
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    Archiver|手机版|小黑屋|Discuz! X

    GMT+8, 2025-2-12 20:00 , Processed in 0.017756 second(s), 3 queries , Gzip On, Redis On.

    Powered by Discuz! X3.5

    © 2001-2024 Discuz! Team.

    快速回复 返回顶部 返回列表