Wordpress does not work for port 80? But common php is no problem

Viewed 17

I run into a strange problem. I have built a wordpress site in a sub domain with Nginx.

  1. It works for access with port none-80, for example:

    http://doc.mydomain.com:8085

  2. Then I change its port configuration to 80, but access fails with:

    http://doc.mydomain.com

I check the access log, there is only a 301 redirect.

  1. I thought it might due to php, then I replace the content of index.php, it works!

    <?php phpinfo()

So, why the Nginx directs wordpress, while not redirects common php?

1 Answers

I got the reason. The configuration of Wordpress admin has set the website url is http://doc.mydomain.com:8085. After change it, the issue is fixed.

Related