Question

incomplete URL path - Nginx, multisite, subdomain

Posted June 6, 2015 2.3k views
NginxWordPress

This is a really frustrating one.

I have setup a nginx fastCGI server (debian), with a multisite install. All kind of works, however:

Essentially wordpress URL paths are incorrect for links that are on the front-end of a website, they just redirect to the current page, it does not add the url extension required (i.e. “my account” link for a woocommerce link or similar) and on the backend theme/plugin activation links are wrong. There are bits missing out of the URL path.

For example, where the URL should be:
example.com/wp-admin/network/themes.php?page=install-required-plugins

I get:
example.com/wp-admin/themes.php?page=install-required-plugins

Which is incorrect and results with a permission issue.

Another example, what should be:
example.com/wp-admin/network/admin.php?page=WordfenceSecOpt (selectable from side menu)
has a link from the dashboard of:
example.com/wp-admin/admin.php?page=WordfenceSecOpt

As you can see it is stripping the full URL path.

I thought this may be plugins themes etc. so I disabled everything and tried, then removed everything and tried, no avail.

Then thinking it is likely FastCGI, Nginx or similar, I went about setting up a completely separate server, with a different LEMP configuration and nothing on it. Once again, the same has occurred.

Having tried too many times to count, crashing both servers several time and 2 days of Google'ing I have given up.

I’m hoping someone here could help point me in the right direction?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Without knowing more about how Nginx was configured in this instance, it is hard to give a thorough answer. WordPress has an extensive article on configuring Nginx, including a section with a sample configuration file specifically for setting up multi-site. If you are using WP Super Cache or W3 Total Cache, there are also samples for multi-site configuration there. The team at Nginx also provides a sample configuration for WordPress multi-site.

Hope that points you in the right direction!

Submit an Answer