If the size in a request exceeds the configured value, the error 413 is returned. Setting size to 0
disables checking of client request body size.
client_max_body_size 8M;
server { listen 80; listen 443 ssl; server_name www.old-name.com old-name.com; return 301 $scheme://www.new-name.com$request_uri; }
server { listen 80; server_name example.com; location ~ ^/~(.+?)(/.*)?$ { alias /home/$1/html$2; index index.html; autoindex on; } }
include=/etc/php/fpm.d/*.conf
[example.com] listen = /run/php-fpm/example.com.sock # owner of the socket file listen.owner = http # owner of the files in the web root user = example group = users # for low load and many pools pm = ondemand pm.max_children = 5 pm.process_idle_timeout = 10s
worker_processes 1; error_log /var/log/nginx/error.log; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; log_format main '$remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; keepalive_timeout 65; gzip on; server { listen 80; server_name localhost; location / { root /srv/http/; index index.html index.htm index.php; autoindex on; location ~ \.php { fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; include /etc/nginx/fastcgi_params } } } include /etc/nginx/sites/*.conf; }
server { listen 80; server_name example.com; root /srv/http/example.com/; location ~ ^(.+?\.php)(/.*)?$ { include /etc/nginx/fastcgi_params; fastcgi_pass unix:/run/php-fpm/example.com.sock; } }
location / { proxy_pass http://127.0.0.1:8090; include /etc/nginx/proxy_params; } location ~* \.(js|css|jpg|jpeg|gif|png|svg|ico|pdf|html|htm)$ { }
For nginx to listen properly on IPv6, you need two listen
directives:
server { listen 80; listen [::]:80; … }
server { … add_header Permissions-Policy "interest-cohort=()"; … }