MilesWeb
MilesWeb Hosting Forum

Please login or register.

Login with username, password and session length

 

News:

SMF - Just Installed!


Author Topic: Nginx Wordpress Permalinks issue  (Read 4096 times)

0 Members and 1 Guest are viewing this topic.

Offline Manish

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Nginx Wordpress Permalinks issue
« on: December 02, 2016, 04:32:18 PM »
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.

Quote
try_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: http://www.webuzo.com/wiki/Add_Extra_Configuration_File

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

MilesWeb Hosting Forum

Nginx Wordpress Permalinks issue
« on: December 02, 2016, 04:32:18 PM »

Offline Manish

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Nginx Wordpress Permalinks issue
« Reply #1 on: January 12, 2017, 09:22:46 AM »
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:

Quote
location /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.