Difference between revisions of "WebServer - Proxy VirtualHost Configuration"
		
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
		
		
		
		
		
	
| Line 3: | Line 3: | ||
| *[[WikiPedia:Fully qualified domain name|FQDN]] being proxied | *[[WikiPedia:Fully qualified domain name|FQDN]] being proxied | ||
| **'''Test.Domain.Net''' | **'''Test.Domain.Net''' | ||
| − | *Internal server FQDN | + | *Internal server [[WikiPedia:Fully qualified domain name|FQDN]] | 
| **'''Server.LocalDomain.net''' | **'''Server.LocalDomain.net''' | ||
Revision as of 13:33, 15 July 2020
An Example:
#########################
# Test.Domain.Net     #
#########################
<VirtualHost *:80>
    ServerName Server.LocalDomain.net
    Redirect permanent / https://Test.Domain.Net/
</VirtualHost>
<VirtualHost *:80>
    ServerName Test.Domain.Net
    Redirect permanent / https://Test.Domain.Net/
</VirtualHost>
<VirtualHost _default_:443>
    ServerName Test.Domain.Net
    ProxyRequests on
    SSLEngine On
    SSLProxyEngine On
    ProxyPreserveHost Off
    # Redirect HTTPS traffic
    ProxyPass / https://Server.LocalDomain.net/
    ProxyPassReverse / https://Server.LocalDomain.net/
    SSLCertificateFile /etc/letsencrypt/live/Test.Domain.Net/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/Test.Domain.Net/privkey.pem
    <Proxy "*">
        Order allow,deny
        Allow from all
    </Proxy>
        ErrorLog /var/log/apache2/Proxy/TDN.log
        CustomLog /var/log/apache2/Proxy/TDN-access.log combined
</VirtualHost>
