Can't login to WP after install with Apache and Nginx as proxy

May 31, 2019 146 views
Apache Nginx WordPress Ubuntu 18.04

Hello,

I'm new to this sysadmin area but with the extensive tutorials here and with research on Google I decided and managed to install WP manually on an Apache server with Nginx as a proxy. I know it's a bit overcomplicated especially for a beginner, but hey, challenges :) Anyway I got trough all of it and installed WP in the end. I set up a user, but now when I navigate to the admin login and enter the credentials, it looks like nothing happens. I don't have a domain yet as I only play around and learn all of it so I'm using it with plain IP. I also set up self-signed SSL. Now I feel lost a bit where can be the problem as there are no error messages or anything that could help. However on the "homepage" I get "too many redirects" from Chrome, as well. Maybe the 2 connected somehow. My guess is Apache or Nginx is not configured well but I can't put my finger on the error as the default sites (before WP was installed) loaded fine and the login.

In the Apache error log I have only this:
[Fri May 31 11:47:47.252424 2019] [php7:error] [pid 16854] [client 127.0.0.1:53124] script '/var/www/html/wp-admin.php' not found or unable to stat

And it's true, the wp-admin.php is in the wp-admin folder where it supposed to be.

So can somebody help me, please?

1 Answer

Hello,

My guess is that the reverse proxy is misconfigured, you need to make sure that you have the the X-Real-IP and the X-Forwarded-For headers in your Nginx config.

Can you please show us your Nginx and Apache configs?

Have another answer? Share your knowledge.