Communication is much faster in today’s world. Likewise, faster websites make users happy.

Here’s the role of the “Plesk Reverse Proxy Server” which helps to load the website more quickly.

Also, it improves the performance of the website by distributing client requests to suitable back-end servers.​

That’s why, our Support Engineers suggest “Reverse Proxy Server” as one of the server tweaks for our customers.

Today, we’ll see how our Technical Team install Plesk Reverse Proxy and fix the related errors with it.

 

What is a Reverse Proxy Server?

Before going into details of the Plesk reverse proxy, let’s first know more about reverse proxy server and its features.

The reverse proxy server acts as an identification shield between the client computer and back-end web servers. These web servers hold the actual data for the websites. It helps to direct client requests to the appropriate back-end server.

Load balancing is one of the most common uses of a reverse proxy for web applications. Moreover, it helps the clients to protect their important information from getting hacked by hackers. Therefore, it acts as an additional defense against cyber attacks.

Moreover, reverse proxy ensures the smooth flow of network traffic between clients and servers. That’s pretty much enough for any server owner to go ahead and set up a reverse proxy server. Luckily, Plesk comes with options to setup reverse proxy too.

 

How we installed and enabled Nginx reverse proxy on Plesk Server

Let’s see how our Support Engineers installed Nginx as a reverse proxy in customer’s Plesk server. The exact sequence of commands executed in Plesk were:

1. In Plesk, select Tools & Settings and click Updates and Upgrades.

2. Then click on Add/Remove Components.

3. After that, select Nginx web server for installation. Then we click Continue to begin the installation.

4. After the installation, we need to enable the Nginx reverse proxy service in Plesk. For this:

  • We selected Tools & Settings > Services Management.
  • Finally, clicked the button next to Reverse Proxy Server (nginx).

It took some time for the setup. And, Nginx was set as the reverse proxy on the server.

 

How we fixed- The Issues After Enabling Nginx As a Proxy On a Server

From our server managing experience, we have seen many customers facing different kind of problems with Plesk reverse proxy server.

Let’s see how our Support Team solved such errors.

 

1. Website Errors due to IP blocks

Recently, one of our customers approached us to fix his server. His websites were showing errors like 502 Bad Gateway. It started after enabling Nginx on the server.

Here, our Support Engineers had to find the exact issue first.

1. Initially, we analyzed the proxy log, such as /var/www/vhosts/system/example.com/logs/proxy_error_log

We found an entry like the following,

2. Again, we verified the system logs, “/var/log/messages“. We got another error that was related to IP block.

Nov 12 07:59:12 wh01 xxx: 'nginx' failed, cannot open a connection to INET[0.0.0.0:80]

3. So, the next step was to check the possible IP block. The server was having Fail2ban installed that helps to protect the servers from brute-force attacks.

4. Finally, we also checked the Fail2Ban logs to identify the problem, and found the following entry in the log “/var/log/fail2ban.log

2019-8-12 05:45:57,699 fail2ban.filter [10036]: INFO [plesk-apache-badbot] Found 0.0.0.0

5. Thus, we identified the cause of the problem as Fail2Ban blocking the IP address on the server.

Moreover,  after identifying the issue our Support Engineers added the IP address to “Trusted IP Addresses”. And, that fixed the problem.

 

2. ERR_CONNECTION_REFUSED.

Similarly, often Plesk reverse proxy can create messages like “ERR_CONNECTION_REFUSED” while accessing websites.

On detailed troubleshooting, we found the following entry in /var/www/vhosts/domain.com/logs/proxy_error_log

But, there were no processes listening on port 80, which means Nginx service was not running.

Finally, we restarted the service Nginx and that fixed the problem.

[Having tough time with Plesk reverse proxy? Our Plesk experts can fix it for you.]

 

Conclusion

In short, Plesk Reverse Proxy helps in load balancing, increasing security and make website faster.​ Today, we saw how our Support Engineers set up “Plesk Reverse Proxy” on a Plesk server and solve related issues.



Source link

Author

Write A Comment