AMH 社区首页
AMH社区 - 开放自由有价值的社区
[求助帖] 这种情况下AMH该怎么设置 |
|
---|---|
hunterzuo |
hunterzuo 发表于 2015-10-09 00:14:22
本人有一台vps,安装了AMH5.1,上面放了4个网站
其中一个域名是www.xxx.net,启用了https访问,设置了80端口强制跳转443端口 没有使用官方的owncloud插件 而是想把owncloud安装到www.xxx.net的子目录中 通过www.xxx.net/owncloud来访问 看了论坛里和google上不少的帖子,无论如何设置nginx的配置文件,还是设置rewrite规则都不成功 错误都是一样的,404 not found 这几天都折腾得快疯了,请教版上各位大神 该怎么设置啊
点赞,加油! (0分)
2015-10-09 00:14:22 1
|
amysql |
如果你是自己安装owncloud,
配置参考 server { listen 80; #listen end server_name 域名.com.cn www.域名.com.cn; #s erver_name end index index.html index.htm index.php; #index end set $subdomain ''; root /home/wwwroot/环境名/domain/域名.com.cn/web$subdomain; include /home/wwwroot/环境名/rewrite/amh.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/环境名/domain/域名.com.cn/web; } client_max_body_size 10G; fastcgi_buffers 64 4K; rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect; rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect; rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect; index index.php; location = /robots.txt { allow all; log_not_found off; access_log off; } location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README) { deny all; } location / { rewrite ^/.well-known/host-meta /public.php?service=host-meta last; rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last; rewrite ^/.well-known/carddav /remote.php/carddav/ redirect; rewrite ^/.well-known/caldav /remote.php/caldav/ redirect; rewrite ^(/core/doc/[^\/]+/)$ $1/index.html; try_files $uri $uri/ /index.php; } location ~ \.php(?:$|/) { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_index index.php; include fcgi.conf; fastcgi_param DOCUMENT_ROOT /home/wwwroot/环境名/domain/域名.com.cn/web$subdomain; fastcgi_param SCRIPT_FILENAME /home/wwwroot/环境名/domain/域名.com.cn/web$subdomain$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_pass unix:/tmp/php-cgi-环境名-域名.com.cn.sock; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp3|wma)$ { expires 30d; } location ~ .*\.(js|css)$ { expires 12h; } access_log /home/wwwroot/环境名/logs/域名.com.cn-access.log combined; #access_log end error_log /home/wwwroot/环境名/logs/域名.com.cn-error.log crit; #error_log end }
回复
2015-10-22 12:22:54 2
AMH面板 - 好用高效低占用、安全可靠极稳定 |
hunterzuo |
感谢大神,已顺利解决问题,多谢多谢
回复
2015-10-25 11:17:22 3
|