我有一个Nginx和PHP-FPM的工作安装,其默认索引目录是/usr/share/Nginx/html/
另外,我有一个SVN的工作安装,它的默认目录似乎是/var/www/我试图改变nginx.conf的默认路径指向/var/www/html,但它没有工作:
#
# The default server
#
server {
listen 80;
server_name _;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.php index.html index.htm;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ .php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ .php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
##** I tried to change the line above to /var/www/html/**
include fastcgi_params;
nginx.conf到底需要修改什么?或者我可以把svn的默认目录改为/usr/share/nginx/html ?我怎么能两样都做呢?
如果你想通过nginx通过https提供svn提交访问,我认为这是不可能的。我的建议是有nginx反向代理服务器与apache + mod_dav_svn。如果你愿意,你可以把apache和nginx放在同一台机器上。