1. Path:/etc/nginx/nginx.conf and/ETC/NGINX/CONF.D,
In fact, only/etc/nginx/nginx.conf this one configuration file, because in nginx.conf, other configuration files can be used by the include directive • introduced
Some configuration files:
Server {Listen the; server_name test.net; Root/var/www/test; #include none.conf; #error_page404/404. html; Location~ [^/]\.php (/|$) {include fastcgi_params; Fastcgi_pass127.0.0.1:9000; Fastcgi_index index.php; Client_max_body_size 500m; } Location~ .*\. (gif|jpg|jpeg|png|bmp|swf) $ {expires 30d; } Location~ .*\. (JS|CSS)?$ {Expires 12h; } #location= /hbls.deb {# rewrite./Hbls.deb; # Default_type Application/x-Deb; #} Access_log off; #access_log logs/Lung.access.log; #error_log logs/Lung.error.log Debug; }
2. Set file Upload size limit
Location ~ [^/]\.php (/| $) { include fastcgi_params; Fastcgi_pass 127.0. 0.1:9000; Fastcgi_index index.php; Client_max_body_size 500m; }
Set the size of the client_max_body_size, preferably in a configuration file that needs to be set, flexibility
Nginx config domain name, set file upload size