mod_proxy_html

Permalink
Hello All,

My website is hosted on a server with mod proxy:
On the first server machine:
<VirtualHost *:80>

ServerName nnn.be
ServerAliashttp://www.nn.be
ServerAdmin nn.cc@nnn.com

ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

<Location />
ProxyPasshttp://192.168.178.6/
ProxyPassReversehttp://192.168.178.6/
</Location>

</VirtualHost>

On the second server:
<VirtualHost *:80>
ServerName nnn.be
ServerAliashttp://www.nnn.be
ServerAdmin nnn@nnn.com
DocumentRoot /home/vv/www
</VirtualHost>

But the trouble is that Concrete5 (on the second server) doesn't show the background image when you visit the website from the www, locally it shows the background image. In the source code:
.c5wrap
{
width: 100%; overflow: hidden; background: url(http://192.168.0.97/packages/theme_elegancia_neu/themes/theme_elegancia_neu/img/red.png) repeat-x center top;
}
Which is a wrong (if you visit the website from the www) adres. But the designer told me that he doesn't give a absolute adres.

So I have found that the server (ubuntu 12.04 apache) does a html rewrite.

And now I am stuck.

Somebody?

With regards,
Brian

 
danceanimal replied on at Permalink Reply
Brian;

Do you need to specify an absolute path for your images? From your reverse proxy setup, you seem to be redirecting the entire front-facing website to an internal machine.

If the website is entirely hosted on that internal machine, removing the hostname from the path in your CSS will turn your background image into a relative path.

Using a relative path in your image (ie '/packages/...' rather than 'http://192.168.0.97/packages/...') should allow the proxying.
BrianBaart replied on at Permalink Reply
DanceAnimal,

Thank you for the reply. But I didn't put the absolute adres there (in the css).
Either Concrete5 or apache did that. But I am not sure.
Now I suspect that apache did that with the mod_proxy module.

Also when I add a subpage in Concrete5 and press the create button I get redirected to the same website but with another adres in front of it. So that the server thinks I am an other visitor and need to log in again. And the page is not created. (that is why I think it is the apache module)

I need to sort this one out as the client wants to see what I have made.

With regards,
Brian
BrianBaart replied on at Permalink Reply
Hello All,

I needed to get this working so we changed the settings in the router. So that I have a IP number for my website.

Thanks for reading and answering.

Brian