Tag: nginx

PHP / Nginx: set max file upload and post size

Firstly, you need to locate your php.ini file. In this example, our php.ini file is located in /etc/php/7.0/fpm/php.ini sudo nano /etc/php/7.0/fpm/php.ini In nano, press CTRL + W and search for upload_max_filesize and change the value to 64M (for 64 megabytes). /etc/php/7.0/fpm/php.ini … upload_max_filesize = 64M … Press CTRL + W again and search for post_max_size and…

Continue reading PHP / Nginx: set max file upload and post size

nginx error: “client intended to send too large body”

If you are trying to upload large files and are seeing this error in the nginx error log, it means the client_max_body_size value is too low. Open the nginx configuration file: sudo nano /etc/nginx/nginx.conf It may also be located in /usr/local/nginx/conf/nginx.conf or /usr/local/etc/nginx/nginx.conf. Add the following line within the http block /etc/nginx/nginx.conf http { .…

Continue reading nginx error: “client intended to send too large body”

Job for nginx.service failed because the control process exited with error code.

If you see the error “Job for nginx.service failed because the control process exited with error code. See “systemctl status nginx.service” and “journalctl -xe” for details.” Check the error log to see what the problem is. We can use tail to display the last 200 entries. sudo tail /var/log/nginx/error.log -n 200 Press G (uppercase g)…

Continue reading Job for nginx.service failed because the control process exited with error code.

How to check if the nginx service is running?

To find out if nginx is running or not, run the following command service nginx status ● nginx.service – A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2018-02-14 23:53:45 CET; 6 days ago Process: 20659 ExecReload=/usr/sbin/nginx -g daemon on; master_process on;…

Continue reading How to check if the nginx service is running?

Where is the Nginx Config File Located?

The Nginx configuration file can be in multiple locations and can also include several other config files. To edit the nginx configuration file, first try here. sudo nano /etc/nginx/nginx.conf nginx.conf may also include some other config files, for example: sudo nano /etc/nginx/sites-enabled/default If you followed one of our guides for setting up multiple domains for Nginx,…

Continue reading Where is the Nginx Config File Located?