产品服务AMH 免费服务器主机面板SSL证书 免费SSL证书申请编程助手免费智能写代码、翻译NewAMYSQL 免费MySQL管理工具AMFTP 免费FTP管理客户端

AMH 社区首页

 AMH社区 - 开放自由有价值的社区

[求助帖] owncloud Nginx配置文件

yxzyxz001
铝牌会员
438.00 价值分

yxzyxz001 发表于 2013-07-23 13:27:49
server
{
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
}
适用于AMH
支持
评价: 这个问题有价值吗?  没有 (0分)   有, 感谢 (1分)
2013-07-23 13:27:49 1

amysql
创始人
99532.51 价值分

主要是rewrite URL重写规则。
建议安装模块:AMRewrite-1.0
http://amysql.com/bbs/post-399-1-1.htm

方便维护管理。
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2013-07-23 13:48:52 2

AMH面板 - 好用高效低占用、安全可靠极稳定

Psychz
铝牌会员
334.00 价值分

引用:
amysql 发表于 2013-7-23 13:48
主要是rewrite URL重写规则。
建议安装模块:AMRewrite-1.0
http://amysql.com/bbs/post-399-1-1.htm


请问,意思是说把上面的建立成一个重写规则,然后使用在owncloud的虚拟主机上是么?
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2013-12-19 14:45:03 3

zachchan
铁牌会员
68.00 价值分

owncloud的 默认账户名 密码忘记了 怎么破?
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2018-04-04 20:09:06 4
 1  (总1页)
AMH社区列表
用户服务中心