server { listen 80; server_name domain.com www.domain.com; access_log /var/...........................; root /path/to/root; location / { index index.php index.html index.htm; } location /somedir { autoindex on; } }
禁止访问目录
location /dirdeny { deny all; return 403; }
时间: 2024-10-05 04:58:12