I'm trying to forward an URL to another server using Apache. I created a virtual host in the httpd.conf. It's not working when I try to access ipServeur/test. I can't access the page.
What is wrong?
NameVirtualHost *:80
<VirtualHost *:80>
ServerName ipServeur
ProxyRequests off
ProxyPass /test http://ipOtherServeur:8080
ProxyPassReverse /test http://ipOtherServeur:8080
</VirtualHost>
From apache's wiki :
This error is not really about file permissions or anything like that. What it actually means is that httpd has been denied permission to connect to that IP address and port.
The most common cause of this is SELinux not permitting httpd to make network connections.
To resolve it, you need to change an SELinux boolean value (which will automatically persist across reboots). You may also want to restart httpd to reset the proxy worker, although this isn't strictly required.
To allow apache to make network connections issue the following command.
sudo /usr/sbin/setsebool httpd_can_network_connect 1
Then restart apache.
sudo service httpd restart
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With