我将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 Forbidden nginx / 1.6.0 index.php包含在目录>。<
中编辑2:
systemctl status nginx的输出
●nginx.service - 高性能Web服务器和反向代理 server Loaded:loaded(/usr/lib/systemd/system/nginx.service; 启用)活动:自Sa(2014-07-26 02:45:19)起激活(运行) CEST; 15小时前进程:334 ExecStart = / usr / bin / nginx -g pid /run/nginx.pid; error_log stderr; (code = exited,status = 0 / SUCCESS) 主PID:385(nginx)CGroup:/system.slice/nginx.service ├─385nginx:master process / usr / bin / nginx -g pid /run/nginx.pid; error_log stderr; └─386nginx:工人流程
Jul 26 02:46:41 myhost nginx [334]:2014/07/26 02:46:41 [错误] 386#0: * 1“/home/cseipel/webordner/i...host”Jul 26 02:46:41 myhost nginx [334]:2014/07/26 02:46:41 [错误] 386#0:* 1打开( ) “/home/cseipel/webo...host”Jul 26 02:46:41 myhost nginx [334]: 2014/07/26 02:46:41 [错误] 386#0:* 1 open() “/home/cseipel/webo...host”Jul 26 02:46:43 myhost nginx [334]: 2014/07/26 02:46:43 [错误] 386#0:* 1 “/home/cseipel/webordner/i...host”Jul 26 17:38:00 myhost nginx [334]: 2014/07/26 17:38:00 [错误] 386#0:* 2 “/home/cseipel/webordner/i...host”提示:有些线路是椭圆形的, 使用-l来完整显示。
以下是美丽形状的输出http://paste.debian.net/111790/。