All posts tagged nginx

Cài letsencrypt trên nginx

Update: Using Free Let’s Encrypt SSL/TLS Certificates with NGINX Prerequisites Before starting with Let’s Encrypt, you need to: Have NGINX or NGINX Plus installed. Own or control the registered domain name for the certificate. If you don’t have a registered domain name, you can use a domain name registrar, such as GoDaddy or dnsexit. Create a DNS record that . . . Read more

Nginx request entity too large

If you’re getting 413 Request Entity Too Large errors trying to upload with nginx.net/, you need to increase the size limit in nginx.conf . Add ‘client_max_body_size xxM’ inside the server section, where xx is the size (in megabytes) that you want to allow. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 . . . Read more

Nginx config for webp images

# WebP Express rules # ——————– location ~* ^/?wp-content/.*\.(png|jpe?g)$ { add_header Vary Accept; expires 365d; if ($http_accept !~* “webp”){ break; } try_files /wp-content/webp-express/webp-images/doc-root/$uri.webp $uri.webp /wp-content/plugins/webp-express/wod/webp-on-demand.php?xsource=x$request_filename&wp-content=wp-content ; } # Route requests for non-existing webps to the converter location ~* ^/?wp-content/.*\.(png|jpe?g)\.webp$ { try_files $uri /wp-content/plugins/webp-express/wod/webp-realizer.php?xdestination=x$request_filename&wp-content=wp-content ; } # ——————- (WebP Express ru

Kill all php, nginx, mysql processes

To kill all PHP Processes kill $(ps aux | grep ‘[p]hp’ | awk ‘{print $2}’) To kill all Nginx Processes kill $(ps aux | grep ‘[n]ginx’ | awk ‘{print $2}’) To kill all MySQL Processes kill $(ps aux | grep ‘[m]ysql’ | awk ‘{print $2}’)