I switched from Apache to Nginx web server. How do I configure permalinks under WordPress blog? How can I configure Nginx for WordPress permalinks using virtual hosting?
A permalink is nothing but the web address used to link to your blog content. The URL to each blog post or cms post should be permanent and never change. Hence the name permalink. WordPress has the ability capacity to create a custom URL structure for your blog posts and archives. There are three basic types of WordPress permalinks:
Pretty using mod_rewrite: https://sxi.io/bash-for-loop/
Almost pretty using PHP PATHINFO: https://sxi.io/index.php/bash-for-loop/
In the Settings > Permalinks panel, you can choose one of the more common permalink structures as follows:
How to configure Nginx for WordPress permalinks (“Pretty” permalinks)
Edit your nginx.conf file using a text editor such as nano command or vim command, run: $ sudo vi /etc/nginx/site-enabled/sxi.io.conf Edit/add/append the following location block within the server block:
The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.