• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question nginx + wordpress: SEO Urls error

eiskaltereistee

New Pleskian
Hi,

I created a simple sub domain in wordpress (A development copy of a wordpress page). The WP-Installation uses php 7.1 with nginx as proxy.
Also I have added a .htaccess password protection via plesk gui.

In the additional nginx configuraton I added the following lines:
Code:
if (!-e $request_filename){
    rewrite ^(.*)$ /index.php break;
}

But if I open a seo url like "dev.example.com/test" it redirected to "dev.example.com/" or "dev.example.com/kontakt#startproject" redirected to "dev.example.com/#startproject"

The magic thing, I don't understand is: with the main url it work's very fine! I had no trouble there (Also it's working on any other wordpress page on my plesk installation). I only had that problem with those dev sub domain.

Any idea?
 
Hi,

I want to use nginx as reverse proxy. All images, css and js etc stuff should be handelt by nginx. PHP should rendered by apache.

What is not working? SEO Urls.
It is working for the main domain "example.com" but not for "dev.example.com" and I have no idea why. The configuration for both is the same.
If I open a seo url like "dev.example.com/test" it redirected to "dev.example.com/" or "dev.example.com/kontakt#startproject" redirected to "dev.example.com/#startproject"

Later I want to enable google pagespeed module: PageSpeed Module  |  Google Developers
 
Plesk allows you to do this setting natively, without having to add additional rules in nginx.conf =)

Plesk Panel> Clients> Select Client> Apache & Nginx Settings (choose a domain).

Scroll down the page and check the checkbox: "Processing Static Smart Files". This should enable the setting you want.

About Pagespeed, I strongly suggest you use the official Plesk extension to enable this (via Apache) >>> Google PageSpeed Insights extension - Plesk

I hope my answer has been helpful to you, have a great day! = D
 
Hi,

for example:

I can use this url (non-seo-url): example.com/index.php?pageid=5
Or with a seo-friendly-url: example.com/my-page

So, the Problem is, that nginx returns "404" on any seo-friendly url.
 
Got it, you meant "seo friendly urls" :)

Do the following.
1. Access the directory where your WordPress file is located and delete the ".htaccess" file (you do not need to do anything if this file does not exist).
2. Access your WordPress dashboard. Go to "Settings> Permanent links". Simply click "Save Changes." You do not need to make any changes to this page, just click "Save Changes".

Return me if this worked for you :)
 
I do not want to delete the .htaccess, I need it.
I want that apache works with that .htaccess and I want that apache handled the php requests.

Nginx should only use the images, css and js stuff. Apache do the rest (PHP, .htaccess, etc.)

Any idea?
 
Buddy, you're going to continue using Apache.

What may happen is as follows. Some cache plugin or other configuration in your WordPress may be causing this problem.

In the first step you delete the .htaccess.
But in the second step WordPress will create it again for you.

Please follow the steps I suggested to you and only then provide any additional comments.

If you are hesitant you can always make a backup of .htaccess, although in 99.99% of cases it is not necessary.
 
Back
Top