AMS_Backend/docker/nginx/codeigniter.conf
2025-11-06 13:41:06 +08:00

27 lines
602 B
Plaintext

server {
listen 80;
server_name _;
root /var/www/html/public;
index index.php index.html;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log warn;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass php:9000; # talk to PHP-FPM container by service name
fastcgi_index index.php;
}
location ~* \.(?:css|js|jpg|jpeg|gif|png|svg|woff2?)$ {
expires 7d;
add_header Cache-Control "public";
}
}