Files
Network-MGMT/docker/nginx.conf
T

51 lines
1.2 KiB
Nginx Configuration File

events {
worker_connections 1024;
}
http {
# Extrahiert den Port aus dem Host-Header (z.B. 192.168.86.229:8080 → 8080)
map $http_host $real_port {
default 80;
"~:(?<p>\d+)$" $p;
}
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
# Datei-Upload bis 64 MB
client_max_body_size 64M;
server {
listen 80;
server_name _;
root /var/www/html/public;
index index.php;
# Laravel-Routen
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# PHP-FPM
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_param SERVER_PORT $real_port;
fastcgi_read_timeout 120;
}
# Dotfiles sperren
location ~ /\.(?!well-known) {
deny all;
}
# Logs
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
}
}