Article 5F12Z Apache Reverse Proxy show "Service Unavailable" error.

Apache Reverse Proxy show "Service Unavailable" error.

by
n00b_noob
from LinuxQuestions.org on (#5F12Z)
Hello,
I created two VMs in the VirtualBox. One of them is Reverse Proxy server and another one is Apache Web Server.
The specifications of VM1 (Reverse Proxy) are as follows:
NIC 1 is NAT and Its IP address is "10.0.3.15".
NIC 2 is Internal Network and its IP address is "192.168.1.3".

The specifications of VM2 (Apache Web Server) are as follows:
It has one NIC and its IP address is "192.168.1.4".

Both VMs can see each other. I installed Apache Web Server on the both machines and opened ports 80 and 443 via Firewalld on them:
Code:# firewall-cmd --list-all
FedoraServer (active)
target: default
icmp-block-inversion: no
interfaces: enp0s3
sources:
services: cockpit dhcpv6-client ssh
ports: 80/tcp 443/tcp
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:My goal is:
Code:The Internet --> Reverse Proxy (VM1) --> Apache Web Server (VM2)On the VM1, I did:
Code:# curl http://192.168.1.4
<html>
<head>
<title> This my server. </title>
</head>
<body>
<p> Hello Server. </p>
</body>
</html>And as you see, it can see VM2 Apache Web Server.
On the VM1, I created a Virtual Host configuration file as below:
Code:# touch /etc/httpd/conf.d/reverse.conf
# nano /etc/httpd/conf.d/reverse.confAnd filled it with below lines:
Code:<VirtualHost *:80>

ProxyPreserveHost On
ProxyPass / http://192.168.1.4/
ProxyPassReverse / http://192.168.1.4/

</VirtualHost>Then restarted the Apache Web Server.
When I entered VM1 IP address, then I must see the VM2 "index.html" file, but I see below error:
Code:Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.On VM1, I used VirtualBox Port Forwarding:
Code:Protocol Host IP Host Port Guest IP Guest Port
TCP 127.0.0.1 2080 10.0.3.15 80When I enter "127.0.0.1:2080" in my browser, then logs on VM1 are:
Code:# cat access_log
10.0.3.2 - - [06/Mar/2021:22:03:01 +0330] "GET / HTTP/1.1" 503 299 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36"
10.0.3.2 - - [06/Mar/2021:22:03:01 +0330] "GET /favicon.ico HTTP/1.1" 503 299 "http://127.0.0.1:2080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36"And:
Code:# cat error_log
[Sat Mar 06 22:03:01.275035 2021] [proxy:error] [pid 851:tid 1036] (13)Permission denied: AH00957: HTTP: attempt to connect to 192.168.1.4:80 (192.168.1.4) failed
[Sat Mar 06 22:03:01.275093 2021] [proxy_http:error] [pid 851:tid 1036] [client 10.0.3.2:33820] AH01114: HTTP: failed to make connection to backend: 192.168.1.4
[Sat Mar 06 22:03:01.320469 2021] [proxy:error] [pid 850:tid 990] (13)Permission denied: AH00957: HTTP: attempt to connect to 192.168.1.4:80 (192.168.1.4) failed
[Sat Mar 06 22:03:01.320528 2021] [proxy_http:error] [pid 850:tid 990] [client 10.0.3.2:33822] AH01114: HTTP: failed to make connection to backend: 192.168.1.4, referer: http://127.0.0.1:2080/On VM2:
Code:# cat access_log
#
# cat error_log
#Why?

Thanks.latest?d=yIl2AUoC8zA latest?i=FnBdGr_DCRc:Le0kxVuqao4:F7zBnMy latest?i=FnBdGr_DCRc:Le0kxVuqao4:V_sGLiP latest?d=qj6IDK7rITs latest?i=FnBdGr_DCRc:Le0kxVuqao4:gIN9vFwFnBdGr_DCRc
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments