server { listen 80; servername cswars.com; root /var/www/html; index index.php…
- User
server { listen 80; server_name cswars.com;
root /var/www/html; index index.php index.html index.htm; charset utf-8; access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; location / { # Check if the requested file exists as a regular file try_files $uri $uri/ /index.php?$query_string; } # PHP scripts handling location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } # Disable access to hidden files location ~ /\. { deny all; access_log off; log_not_found off; } autoindex off; # Uncomment and adjust as necessary to serve specific static types # location ~ \.(gif|jpg|png|ico|css|js|svg|woff2|mp3|mp4|webm|ttf)$ { # try_files $uri =404; # }}
it not work properly with this url: https://cswars.com/adminpanel?section=servers
- Assistant
- User
it returns 404, like page doesnt exists, problen with rewriting
- Assistant
- User
what this means
2024/10/07 17:04:38 [error] 557490#557490: *101975 directory index of "/var/www/html/" is forbidden, client: 141.98.11.15, server: _, request: "GET / HTTP/1.1", host: "64.226.126.3" 2024/10/07 17:06:19 [error] 557490#557490: *102049 directory index of "/var/www/html/" is forbidden, client: 46.174.191.32, server: _, request: "GET / HTTP/1.0"
- Assistant
- User
172.71.172.234 - - [07/Oct/2024:17:31:31 +0000] "POST /adminpanel?section=servers HTTP/1.1" 200 101 "https://cswars.com/adminpanel?section=servers" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Edg/129.0.0.0"
as you can see, it not redirected it to index.php for some reason
- Assistant