Files
Tenextsite/nginx.conf
thethinkloops 36f79f374d 26122025
2025-12-26 17:20:16 +05:30

33 lines
772 B
Nginx Configuration File
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
events {}
http {
include mime.types;
default_type application/octet-stream;
server {
listen 80;
server_name localhost;
root /var/www/html;
index index.php;
# 1⃣ Serve static files directly
location ~* \.(css|js|png|jpg|jpeg|gif|svg|ico|woff|woff2|ttf)$ {
try_files $uri =404;
}
# 2⃣ ALL routes → index.php
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# 3⃣ PHP execution
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
}