LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Quick Apache help needed with ProxyPass (https://www.linuxquestions.org/questions/linux-server-73/quick-apache-help-needed-with-proxypass-774300/)

djbon2112 12-08-2009 02:33 PM

Quick Apache help needed with ProxyPass
 
OK, here's my setup in a nutshell (everything is https, i.e. port 443):

Virtual Host at admin.boniface.me
Internal address 10.100.0.1 proxied to admin.boniface.me/redir/r01edge

And here's my config for it:

Code:

##
## Admin site, for admin.boniface.me on port 443
##
<VirtualHost *:443>
        ServerName admin.boniface.me
        ServerPath /

        DocumentRoot /var/www/boniface.me/admin

        # Turn on SSL and SSL Proxy
        SSLEngine on
        SSLProxyEngine on
        SSLCertificateFile /etc/apache2/ssl/admin-boniface-me/admin-boniface-me.crt
        SSLCertificateKeyFile /etc/apache2/ssl/admin-boniface-me/admin-boniface-me.key

        # Disable forward proxy requests since this isn't a proxy server
        ProxyRequests Off
        <Proxy *>
                Order deny,allow
                Allow from all
        </Proxy>

        # Require the username/password
        <Directory />
                AllowOverride AuthConfig
                AuthType Basic
                AuthName "Restricted Area"
                AuthUserFile /etc/apache2/passwd
                Require user administrator
        </Directory>

        ##
        ## This is the list of ProxyPasses: each one is an internal URL that maps to a device on the local network
        ##

        # R01-Edge.boniface.me (Web GUI)
        <Directory /redir/r01edge/>
               
                ProxyPass https://10.100.0.1/
                ProxyPassReverse https://10.100.0.1/
        </Directory>       
</VirtualHost>

Now, my problem is, whenever I access the page at https://admin.boniface.me/redir/r01edge, all the links within the page are to https://admin.boniface.me/<pagename> INSTEAD of https://admin.boniface.me/redir/r01edge/<pagename>, which is needed.

I've tried using Alias and Redirect directives inside that Directory block to fix this, but I'm at a loss. Suggestions?

bathory 12-10-2009 12:25 AM

I don't think you need to include the Proxy directives inside the <Directory ..></Directory>. Try:
Code:

...
# R01-Edge.boniface.me (Web GUI)
                      ProxyPass / https://10.100.0.1/
                ProxyPassReverse / https://10.100.0.1/
</VirtualHost>

and see if it works.


All times are GMT -5. The time now is 01:58 AM.