AMH 社区首页
AMH社区 - 开放自由有价值的社区
[求助帖] owncloud Nginx配置文件 |
|
---|---|
yxzyxz001 |
yxzyxz001 发表于 2013-07-23 13:27:49
server 适用于AMH{ listen 80; server_name 此处替换为域名; #server_name end index index.html index.htm index.php; #index end set $domain ''; if ( $host ~* "(.+)\.(.+)\.(.+)" ) { #set $domain "/$1"; #host subdirectory } if ( $domain = '/www' ) { set $domain ''; } root /home/wwwroot/此处替换为域名/web$domain; include rewrite/amh.conf; #rewrite end client_max_body_size 10G; rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect; rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect; rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect; #error_page error_page 403 = /core/templates/403.php; error_page 404 = /core/templates/404.php; location ~ /ErrorPages/(400|401|403|404|405|502|503)\.html$ { root /home/wwwroot/此处替换为域名/web; } location = /robots.txt { allow all; log_not_found off; access_log off; } location ~ ^/(data|config|\.ht|db_structure\.xml|README) { deny all; } location / { # The following 2 rules are only needed with webfinger 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)(/.*)?$ { try_files $1 = 404; include fastcgi_params; fastcgi_param PATH_INFO $2; fastcgi_pass unix:/tmp/php-cgi-此处替换为域名.sock; fastcgi_index index.php; include fcgi-host.conf; fastcgi_param SCRIPT_FILENAME /web$domain$fastcgi_script_name; } location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ { expires 30d; } location ~ .*\.(js|css)$ { expires 12h; } access_log off; #access_log end error_log /home/wwwroot/此处替换为域名/log/error.log crit; #error_log end } 支持
点赞,加油! (1分)
2013-07-23 13:27:49 1
|
amysql |
主要是rewrite URL重写规则。
建议安装模块:AMRewrite-1.0 http://amysql.com/bbs/post-399-1-1.htm 方便维护管理。
回复
2013-07-23 13:48:52 2
AMH面板 - 好用高效低占用、安全可靠极稳定 |
Psychz |
引用: 请问,意思是说把上面的建立成一个重写规则,然后使用在owncloud的虚拟主机上是么?
回复
2013-12-19 14:45:03 3
|
zachchan |
owncloud的 默认账户名 密码忘记了 怎么破?
回复
2018-04-04 20:09:06 4
|