logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache Reverse Proxy not reversing absolute links
Author
radu990



Joined: 27 Jan 2017
Posts: 1
Location: Moldova, Balti

PostPosted: Sat 28 Jan '17 17:39    Post subject: Apache Reverse Proxy not reversing absolute links Reply with quote

Hello,

I would like to setup a reverse proxy that would reverse as well and the absolute links within the page. My current Configuration is

Code:

<IfModule mod_ssl.c>
        <VirtualHost *:443>
                ServerAdmin webmaster@localhost

                DocumentRoot /var/www/html

                 ErrorLog ${APACHE_LOG_DIR}/error.log
                CustomLog ${APACHE_LOG_DIR}/access.log combined
#               CustomLog "|/usr/bin/tee -a /var/log/apache2/access.log | /usr/bin/logger -t apache -p local1.info" combined

                #   SSL Engine Switch:
                #   Enable/Disable SSL for this virtual host.
                SSLEngine on
                SSLProxyEngine On
                ProxyPreserveHost On

ServerName pge-data3.pp.com
        ServerAlias pge-data3.com
        ProxyRequests Off
        ProxyPreserveHost On

ProxyPass / https://pge-data2.pp.com
ProxyPassReverse / https://pge-data2.pp.com

SSLCertificateFile             path_to_certificate
SSLCertificateKeyFile       path_to_certificate
SSLCertificateChainFile    path_to_certificate
...

</VirtualHost>
</IfModule>


Everything works fine, except the thing that absolute url's are not redirected. If I use relative links, everything works well and proxy reverse them. On absolute it doesn't. Please see the screenshots below. Any chance to make them to reverse as well?
Thanks in advance

http://fs5.directupload.net/images/170127/3ifhb869.png
http://fs5.directupload.net/images/170127/i3nlrojd.png


Last edited by radu990 on Sat 28 Jan '17 19:24; edited 1 time in total
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Sat 28 Jan '17 18:51    Post subject: Reply with quote

Please use a meaningfull subject, see forum rules.

Edit: thanks for changing.

You can try mod_proxy_html http://httpd.apache.org/docs/2.4/mod/mod_proxy_html.html

See also:

http://serverfault.com/questions/561892/how-to-handle-relative-urls-correctly-with-a-reverse-proxy
Back to top


Reply to topic   Topic: Apache Reverse Proxy not reversing absolute links View previous topic :: View next topic
Post new topic   Forum Index -> Apache