nginx web目录更改

nginx web目录更改,nginx,directory,Nginx,Directory,我将把web目录从/srv/http更改为/home/cseipel/webordner 但问题是它不工作xD。 我在配置中没有发现错误,systemctl restart ngnix也不是解决方案 worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream;

我将把web目录从/srv/http更改为/home/cseipel/webordner

但问题是它不工作xD。 我在配置中没有发现错误,systemctl restart ngnix也不是解决方案

worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;

    keepalive_timeout  65;
    #gzip  on;

    server {
        listen      localhost:80;
        server_name  localhost;

        location / {
#            root /srv/http;
         root /home/cseipel/webordner;  
            index index.php index.html;
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /usr/share/nginx/html;
     #    root   /home/cseipel/web;
        }

    location ~ \.php$ {
      fastcgi_pass   unix:/var/run/php-fpm/php-fpm.sock;
      fastcgi_index  index.php;
      root   /srv/http;
    #root   /home/cseipel/web;
      include        fastcgi.conf;
 }

 }

}
编辑:

如果我在Firefox中使用localhost,错误是:403禁止使用nginx/1.6.0
index.php包含在directory>中。我认为您需要从/home文件夹向内打开一些权限,以便从其中的目录为网站提供服务。查看本文作为更改内容的指南:。只需重命名目录并将nginx config root更新为新目录。