这是一个创建于 2663 天前的主题,其中的信息可能已经有所发展或是发生改变。
我是在 window 下用的 laragon 集成环境用来学习开发 laravel。启动 nginx 服务器可以打开 localhost:8080,但是打不开 WWW 目录下面的网站,也就是 XXX.dev ,会提示服务器拒绝连接请求。切换成 apache 服务器不存在该问题
错误日志提示:
2017/08/08 09:40:24 [error] 9928#9048: *4 directory index of "D:/laragon/www/poi/" is forbidden, client: 127.0.0.1, server: localhost, request: "GET /poi/ HTTP/1.1", host: "localhost:8080"
nginx.conf 的配置:
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
include "D:/laragon/etc/nginx/php_upstream.conf";
include "D:/laragon/etc/nginx/sites-enabled/*.conf";
client_max_body_size 2000M;
}
|
|
1
voocel 2017-08-08 12:39:54 +08:00 via Android
关键部分没贴出来
|
|
|
2
lamCJ 2017-08-08 18:36:36 +08:00 via iPhone
server ?
|