35 lines
898 B
Plaintext
35 lines
898 B
Plaintext
server {
|
|
listen 80;
|
|
server_name _;
|
|
|
|
root /var/www/html/public;
|
|
index index.php;
|
|
|
|
charset utf-8;
|
|
client_max_body_size 21M;
|
|
|
|
# Real client IP / forwarded headers come from the host nginx in front.
|
|
location / {
|
|
try_files $uri $uri/ /index.php?$query_string;
|
|
}
|
|
|
|
location = /favicon.ico { access_log off; log_not_found off; }
|
|
location = /robots.txt { access_log off; log_not_found off; }
|
|
|
|
error_page 404 /index.php;
|
|
|
|
# Pass PHP requests to the app (php-fpm) container.
|
|
location ~ \.php$ {
|
|
fastcgi_pass app:9000;
|
|
fastcgi_index index.php;
|
|
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
|
include fastcgi_params;
|
|
fastcgi_hide_header X-Powered-By;
|
|
}
|
|
|
|
# Deny access to hidden files (e.g. .env) and version control.
|
|
location ~ /\.(?!well-known).* {
|
|
deny all;
|
|
}
|
|
}
|