This repository has been archived on 2025-06-09. You can view files and clone it, but cannot push or open issues or pull requests.
LaravelDockerPublisher/docker/nginx/default.conf.template

25 lines
562 B
Plaintext
Raw Normal View History

server {
2025-06-02 10:17:50 +08:00
listen ${NGINX_PORT};
server_name ${NGINX_HOST}; # ✅ 加上分號
root /var/www/html/public;
index index.php index.html;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass app:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}