NGINX Rewrite Rules & Resources
- Add Caching for Static Assets (NGINX) - Send browsers caching directives that they will use to cache static assets on the client-side.
- Block Known Bad Requests (NGINX) - Block bad requests to file extensions not supported on the server.
- Block Specific User-agents (NGINX) - Disallow specific User-agents' requests. Useful for dealing with malicious bots.
- Canonicalize Host – Add/Remove www (NGINX) - Enforce canonical host names by either prepending www or explicitly omitting it from the domain name.
- Enable GZip Compression (NGINX) - Enable compressed responses using GZip to reduce bandwidth and increase performance.
- Enforce Lower Case URLs (NGINX) - Force URLs to lowercase, very important for SEO to avoid duplicate content penalties in search engines.
- Redirect All HTTP Requests To HTTPS (NGINX) - Redirect all non-secure requests to use an HTTPS connection.
- Redirect Default Document to Directory (NGINX) - Redirect all requests to a default document to the parent directory URL. Important SEO tactic to avoid duplicate content penalties.
- Redirect Old Domain to New Domain (NGINX) - Redirect all requests for an old domain to a new domain.
- Remove File Extensions From URLs (NGINX) - Clean up the appearance of URLs slightly by removing file extensions. Used to tidy up URLs a bit, not to 'cloak the technology in use'.
- Reverse Proxy To Another Server (NGINX) - Proxy an intranet, or other, server's content through a different webserver.
Articles & Resources
- Beginners Guide to NGINXThis guide describes simple processes, such as how to start and stop nginx, reload its configuration, explains the structure of the configuration file, and more.
- Convert Apache Rules to NGINXShows how to convert existing Apache Rules to NGINX format.
- Creating NGINX Rewrite RulesThe definitive guide to creating NGINX rewrite rules, from the source.
- Install Lets Encrypt Cert in NGINXHow to install the free Lets Encrypt SSL certificate in NGINX.
- Online .htaccess to NGINX ConverterOnline tool to help convert Apache .htaccess rules to NGINX format.
- Tools for Monitoring NGINXProper NGINX monitoring can reveal a lot of useful information about the underlying application performance, and there are quite a few options available.
Though NGINX (pronounced engine X) became famous as the fastest web server, the underlying architecture has proved ideal for many web-related tasks beyond just serving content. Because it can handle a high volume of connections, NGINX is commonly used as a reverse proxy and load balancer to manage incoming traffic and distribute it to slower upstream servers – anything from legacy database servers to microservices. NGINX currently boasts about 41% of the web server market, slowly encroaching on Apache’s share.