nginx version: nginx/1.10.3 (Ubuntu)
Usage: nginx [-?hvVtTq] [-s signal] [-c filename] [-p prefix] [-g directives]
Options:
-?,-h : this help
-v : show version and exit
-V : show version and configure options then exit
-t : test configuration and exit
-T : test configuration, dump it and exit
-q : suppress non-error messages during configuration testing
-s signal : send signal to a master process: stop, quit, reopen, reload
-p prefix : set prefix path (default: /usr/share/nginx/)
-c filename : set configuration file (default: /etc/nginx/nginx.conf)
-g directives : set global directives out of configuration file$ nginx -s reload
location / {
allow 123.34.12.123;
allow 11.22.33.1/100;
deny all;
}
location ~* \.(ini|docx|txt|doc)$ {
deny all;
}
location ~* \.html$ {
deny all;
}
Finally found is pho-fpm version error.
location ~ \.php$ {
# ...
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
# ...
}
$ ln -s /etc/nginx/sites-available/example.com.conf /etc/nginx/sites-enabled/example.com.conf
/etc/nginx/nginx.conf:
client_max_body_size 20m;
php.ini:
upload_max_filesize = 20M
post_max_size = 20M