Apache Reverse Proxy

by K8CTR

Posted Thursday, April 10, 2014 3:00 PM


For hosting multiple servers (Gitlab and some dev servers) through a single router port forward, I used the following configuration on a local Apache instance. There was a bit of an SSL issue which seemed to resolve when the reverse proxy hosted the SSL certificates for the configured domain as well. GitLab has a page on setting up https here.

SSL Cert

The SSL cert and private keys were generated on the destination server, then copied to the reverse proxy.

openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout sub.example.com.key -out sub.example.com.crt

ports.conf

NameVirtualHost *:443

Virtual Host (sites-available/000-default.conf)

    <VirtualHost *:80>
        ServerName sub.example.com
        ServerAdmin josh@example.com
    
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
        LogLevel error
    
        SSLProxyEngine on
    
        ProxyPreserveHost On
        ProxyRequests off 
        ProxyPass / http://192.168.1.100/
        ProxyPassReverse / http://192.168.1.100/ 
    </VirtualHost>

    <IfModule mod_ssl.c>
        <VirtualHost *:443>
            ServerName sub.example.com
            SSLEngine On
            SSLProxyEngine On
            ProxyRequests Off
            SSLCertificateFile /etc/apache2/ssl/sub.example.com.crt
            SSLCertificateKeyFile /etc/apache2/ssl/sub.example.com.key
            #SSLCertificateChainFile /etc/apache2/ssl/sub.class1.server.ca.pem
            SSLCACertificateFile /etc/apache2/ssl/sub.example.com.crt
            SetOutputFilter INFLATE;proxy-html;DEFLATE;
            ProxyHTMLInterp On
            ProxyHTMLExtended On
            ProxyHTMLURLMap (.*)192.168.1.100(.*) https://sub.example.com$2 [Rin]
            ProxyPass / https://192.168.1.100/
            ProxyPassReverse / https://192.168.1.100/
        </VirtualHost>
    </IfModule>

Labels: , ,

3 Comments

Blogger Unknown  May 15, 2015 at 5:11 PM

for other people who do not know what that means reverse proxy I share with

them this video
what is reverse proxy

Blogger waldyvaca  November 9, 2022 at 8:40 AM

The fee acknowledged, nevertheless, that speaking of those advantages was not applicable with out acknowledging the unknown and unmeasured unfavorable results that arose from residents who turned drawback or pathological gamblers. The central query therefore becomes whether the online will increase in income and well-being from gambling are value the|definitely worth the} acknowledged social costs. You can play money video games, sit & goes, and tournaments with guaranteed money prizes reaching 1xbet over $1,000,000.

Anonymous Anonymous  November 10, 2022 at 9:18 PM

When the participant hovers over any half of} the statistics diagram, the spot on the betting desk the place a chip could be placed is highlighted. Players can open Statistics to view the profitable numbers in up to as} 500 of the newest sport rounds. The participant can use the slider to change the variety of past rounds to use. Dedicated Roulette provides licensees the choice to add a whole studio installation that adds a number of} HD cameras around 1xbet the wheel and supplier on your dedicated Live Roulette tables. Licensees simply select the variety of cameras and the shot angles.

Post a Comment