# Forte behind Caddy: php-fpm on 127.0.0.1:9000, everything routed through index.php?req= (Forte's sample), dotfiles # and its configuration never served worker_processes auto; pid /tmp/nginx.pid; error_log /dev/stderr warn; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; access_log /dev/stdout; client_body_temp_path /tmp/nginx-client-body; proxy_temp_path /tmp/nginx-proxy; fastcgi_temp_path /tmp/nginx-fastcgi; uwsgi_temp_path /tmp/nginx-uwsgi; scgi_temp_path /tmp/nginx-scgi; sendfile on; server_tokens off; absolute_redirect off; set_real_ip_from 10.0.0.0/8; set_real_ip_from 11.0.0.0/8; set_real_ip_from 172.16.0.0/12; set_real_ip_from 192.168.0.0/16; real_ip_header X-Forwarded-For; map $http_x_forwarded_proto $fcgi_https { default on; http ""; https on; } server { listen 8080; server_name _; root /var/www/html; index index.php; client_max_body_size 100m; location ~* ^/(\.htconfig\.php|\.env|\.git|composer\.|compose\.) { return 404; } location ~ ^/(store|util|contrib|tests)(/|$) { return 404; } location ~ ^/view/tpl/.*\.tpl$ { return 404; } location ^~ /.well-known/ { try_files $uri $uri/ /index.php?req=$uri&$args; } location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.*)$; fastcgi_pass 127.0.0.1:9000; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_param HTTPS $fcgi_https; fastcgi_param REMOTE_USER $http_authorization; fastcgi_read_timeout 120; } location / { try_files $uri $uri/ /index.php?req=$uri&$args; } } }