News:

SMF - Just Installed!

Main Menu

Nginx Wordpress Permalinks issue

Started by Manish, December 02, 2016, 04:32:18 PM

Previous topic - Next topic

Manish

Hello,

On Webuzo with nginx, wordpress permalink doesn't work by default. Due to that sub-pages or internal links don't work and they show 404 errors. In such situation we will need to add extra configuration file of domain in nginx.

For that create a custom config file on your computer and add below content in it.

Quotetry_files $uri $uri/ /index.php?q=$uri&$args;

Example: Create permalink.conf file and add provided code in it.

After that Follow below steps:

1: Login to Webuzo panel and go to Domain >> Extra Configuration

2: Select the Domain for which you want to ADD Extra Configuration File.

3: Select the Webserver for which you want to ADD Extra Configuration File.

4: Populate the input field with the location of your configuration file.

5: Click on Add record button.

6: Then restart the nginx service on the server.

Ref: https://www.webuzo.com/docs/endusers/add-extra-configuration-file/

That's it. All sub-pages and links should be working fine  :)

Manish

Hi,

If your blog is in subfolder like http://domainname/subfolder it does not work and shows "Page not found error. In such issues you will need to add separate permalink entry in configuration file on Webuzo.

Go to the path of ngnix configuration: /usr/local/apps/nginx/etc/conf.d
Open file "common" and add the below entry at the end of the file:

Quotelocation /subfoldername/ {
    try_files $uri $uri/ /subfoldername/index.php?$args;
}

Then restart the ngnix service on the server.

Add entry for each subfolder in which your blog is created.