WordPress was installed but showed me 404 Not Found Nginx for some domains on reverse proxy

I Configured Nginx as a Web Server and Reverse Proxy for Apache on One Ubuntu 20.04 Server and it worked perfectly. But the problem is WordPress. I created 5 virtual servers on Virtualmin but only 2 domains worked after installing WordPress.
For domain 1= WordPress was installed and worked at domain.com/wp-admin/install.php
For domain 2= WordPress was installed but showed me 404 Not Found Nginx
For domain 3= WordPress was installed but showed me 404 Not Found Nginx
For domain 4= WordPress was installed and worked at domain.com/wp-admin/install.php
For domain 5= WordPress was installed but showed me 404 Not Found Nginx
I also deleted domain 2, 3, and 5 virtual servers and recreated it again but still shows the same results.

Also on Virtualmin >> Services>>Preview Websites
For domain 1= It loaded the Virtualmin ā€œdomain under constructionā€ Default page.
For domain 2= It loaded the Apache2 Ubuntu Default Page
For domain 3= It loaded the Apache2 Ubuntu Default Page
For domain 4= It loaded the Virtualmin ā€œdomain under constructionā€ Default page.
For domain 5= It loaded the Virtualmin ā€œdomain under constructionā€ Default page.

Iā€™m not really tech-savvy. I do follow instructions to set up my VPS.
I donā€™t think itā€™s the reverse proxy because 2 domains are working under the configuration.
But at this point, I donā€™t really know whatā€™s happening. Can someone guide me through how to solve this problem?

Virtualmin is an ideal tool and GUI for ā€˜not really tech-savvyā€™ people to manage systems and run a web hosting service. This is usually done without a reverse proxy. You say you followed instructions: which instructions did you follow to set up a reverse proxy on a Virtualmin system? Can you share the URL?

Ok please can you help me

I will try my best to help you, as will many others here.

Could you answer this question?

Yes this is the link.
https://hostadvice.com/how-to/how-to-configure-nginx-as-reverse-proxy-for-apache-on-ubuntu-16-04/

Can you help me.

Hmm, so you have an Ubuntu 16 system on which you are running Virtualmin? Please share Virtualmin and Webmin versions that you are using.

No 20.04
With the latest webmin and virtualmin version

So you have applied the instructions for setting up a reverse proxy written for a Ubuntu 16 system to a system running Ubuntu 20?

I would suggest in the strongest possible terms that you install Virtualmin on a fresh Ubuntu 20 system and then get all your websites transferred over to that. It should be fairly painless compared to what you have been through due to your adventure with reverse proxy and we will be able to assist you should you need help with your more standard Virtualmin install.

1 Like

My advice is:

  1. Reinstall and update the OS.
  2. Reboot the OS.
  3. Install Virtualmin (LAMP).
  4. Use Apache.

Unless your WP sites are absurdly busy or are subject to sudden, massive traffic spikes, you donā€™t need the reverse-proxy setup. Itā€™s a needless complication of the simple.

I have nothing against that setup, by the way ā€“ when thereā€™s a reason for it (caching, load-balancing, etc.). If that describes your situation, then fine. Otherwise, why complicate something that was designed for and works just fine on a standard LAMP system?

Richard

Today I learned that the instructions to setup a reverse proxy from 4 years ago are usless today (installing nginx, putting apache to listen on other ports, and a couple of easy configs).
And I also learned that the fix for it is reinstall the server with a fresh install. :man_facepalming:

The nginx as reverse proxy setup is a good setup. I use it in several web servers (none are virtualmin tho, yet) and performs great.

There are a important benefits of setting up a Nginx reverse proxy:

  • Load Balancing: A Nginx reverse proxy can perform load balancing which helps distribute client requests evenly across backend servers. It also improves redundancy as if one server goes down, the reverse proxy will simply reroute requests to a different server according to the routing policy.
  • Increased Security: A Nginx reverse proxy also acts as a line of defense for your backend servers. Configuring a reverse proxy ensures that the identity of your backend servers remains unknown.
  • Better Performance: Nginx has been known to perform better in delivering static content file and analyse URLs

If instead fixing your service you opt to reinstall, donā€™t install ubuntu, and choose a proper OS like CentOS.

Thanks bro. Iā€™m ignorant of it

I second that. Go Centos7ā€¦ find How to install Virtualmin/Webmin on Hostwinds. If you can install C7, follow directions and youā€™ll be up and running in 10 minā€¦

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.