首页 文章

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

提问于
浏览
1

我有一个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?我怎么能做这两件事呢?

1 回答

  • 1

    如果您希望通过nginx提供对https的svn提交访问,我不相信这是可能的 . 我建议使用apache mod_dav_svn将nginx反向代理服务器 . 如果你愿意,你可以在与nginx相同的机器上运行apache .

相关问题