Created
February 23, 2012 18:52
-
-
Save nkabir/1894312 to your computer and use it in GitHub Desktop.
Apache Https VirtualHost
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NameVirtualHost *:80 | |
| Listen 80 | |
| <IfModule mod_ssl.c> | |
| # If you add NameVirtualHost *:443 here, you will also have to change | |
| # the VirtualHost statement in /etc/apache2/sites-available/default-ssl | |
| # to <VirtualHost *:443> | |
| # Server Name Indication for SSL named virtual hosts is currently not | |
| # supported by MSIE on Windows XP. | |
| NameVirtualHost *:443 | |
| Listen 443 | |
| </IfModule> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # a2enmod proxy | |
| # atenmod proxy_http | |
| NameVirtualHost *:443 | |
| <VirtualHost *:80> | |
| RewriteEngine on | |
| ReWriteCond %{SERVER_PORT} !^443$ | |
| RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L] | |
| </VirtualHost> | |
| <VirtualHost *:443> | |
| DocumentRoot "/var/www" | |
| ServerName stemsrv01 | |
| ServerAdmin sysadmin@rocketknowledge.com | |
| SSLEngine on | |
| SSLCertificateFile /etc/apache2/ssl/apache2.pem | |
| SSLProxyEngine on | |
| RewriteEngine On | |
| RewriteRule ^/$ /phpldapadmin [L,R] | |
| RequestHeader set Front-End-Https On | |
| ProxyRequests On | |
| ProxyPreserveHost On | |
| ProxyVia full | |
| <Proxy *> | |
| Order deny,allow | |
| Allow from all | |
| </Proxy> | |
| ProxyPass /phpldapadmin http://internal_name/phpldapadmin | |
| ProxyPassReverse /phpldapadmin http://internal_name/phpldapadmin | |
| # ProxyPass /exchweb https://mxbsas.example.local/exchweb | |
| # ProxyPassReverse /exchweb https://mxbsas.example.local/exchweb | |
| # ProxyPass /public https://mxbsas.example.local/public | |
| # ProxyPassReverse /public https://mxbsas.example.local/public | |
| # ProxyPass /exchangerng https://mxrng.example.local/exchangerng | |
| # ProxyPassReverse /exchangerng https://mxrng.example.local/exchangerng | |
| </VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment