繁体   English   中英

如何使用nginx + php-fpm设置SVN?

[英]How to set up SVN with nginx+php-fpm?

我的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放在同一台计算机上。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM