目录列表:403禁止的nginx
您好,我开始使用nginx,将nginx.conf设置到我的项目文件夹C:/Projects 我曾经(AutoIndex:on)有一个目录列表,但不起作用目录列表:403禁止的nginx,nginx,Nginx,您好,我开始使用nginx,将nginx.conf设置到我的项目文件夹C:/Projects 我曾经(AutoIndex:on)有一个目录列表,但不起作用 worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
server {
listen 80;
server_name localhost;
root C:\Project ;
index index.html index.htm index.php;
location / {
autoindex on;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
如果您的
根目录(或C:\Project
下的任何子目录)中存在一个索引
文件,则将显示索引页,而不是内容索引
您可能还想检查根目录下所有内容的权限
;它们需要能够被运行Nginx进程的用户读取
可能有很多不同的东西;将来你需要用你已经尝试过的和没有尝试过的来澄清你的问题。继续你的自动索引代码>在您的位置块之外
worker_processes 1;
事件{
工人(1024);;
}
http{
包括mime.types;
默认_类型应用程序/八位字节流;
发送文件到
server {
listen 80;
server_name localhost;
root C:\Project ;
index index.html index.htm index.php;
# moved here
autoindex on;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}