I have to servers apache, 1st is in my dmz (192.168.0.206), 2d one in my vlan (192.168.0.63).
On the first one, there is an apache server configured like :
# ---------------------------------------------
<VirtualHost *:80>
ServerName mywebsite.myserver.net
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://192.168.0.63:80/
ProxyPassReverse / http://192.168.0.63:80/
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>
On the 2de one:
<VirtualHost 192.168.0.63:80>
ServerName mywebsite.myserver.net
RewriteEngine on
RewriteRule ^/(.*) https://mywebsite.myserver.net/$1
</VirtualHost>
# SSL
<IfModule mod_ssl.c>
<VirtualHost 192.168.0.63:443>
ServerName mywebsite.myserver.net
DocumentRoot /var/www/html/mywebsite/
ErrorLog /var/log/apache2/mywebsite.myserver.net/error.log
CustomLog /var/log/apache2/mywebsite.myserver.net/access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/apache/mywebsite.myserver.net/cert.pem
SSLCertificateKeyFile /etc/ssl/certs/apache/mywebsite.myserver.net/privkey.pem
SSLCertificateChainFile /etc/ssl/certs/apache/mywebsite.myserver.net/fullchain.pem
</VirtualHost>
</IfModule>
mywebsite.myserver.net has a public IP which is the public IP of a firewall. This one has a FORWARD rule to the 1st apache
-A FORWARD -d 192.168.0.206/32 -i eth0 -p tcp -m multiport --dports 80,443 -j ACCEPT
This rules works if I modify 1st apache conf to local virtual host.
But it doesn't work if I use:
ProxyPass / http://192.168.0.63:80/
ProxyPassReverse / http://192.168.0.63:80/
80 and 443 are accepted between 0.206 and 0.63. (telnet 192.168.0.63 80 from .206 works)
Did I miss something ?