Installing concrete site in DMZ

Permalink
I have a virtual machine running ubuntu 10.10 in a DMZ on the firewall. What this means is it is contactable by both the Internet and our local lan, with security measures in place so that it cannot contact the local lan by itself.
It has a local address of 10.1.1.8 and a public address of (for simplicity sake) 1.2.3.4 The nat is correctly configured on the firewall and an access rule is in place. I can contact the server from the outside, but it doesn't display a webpage. It appears the BASE_URL definition is the culprit, it sayshttp://10.1.1.8. So obviously connecting from the local lan works fine, but not the internet. Is there a proper way to define this base_url? Should I use virtualhosts in apache?

bjzielinski
 
olsgreen replied on at Permalink Reply
olsgreen
If you have your BASE_URL ashttp://10.0.0.18, C5 will try to redirect the browser to that address if the requested hostname doesn't match the value of the BASE_URL. Thus, if you hit the site from outside it will try and redirect the request tohttp://10.0.0.18 which is not a public address.

Have you tried setting the BASE_URL to the public IP? Should work providing your router can handle requests on the public interface from the LAN.

Virtual hosts won't help.
Mnkras replied on at Permalink Reply
Mnkras
try commenting out the base_url and dir_rel lines,
bjzielinski replied on at Permalink Reply
bjzielinski
I've tried commenting those lines out but it won't load at all. I've also tried some trickery to put it as a variable based on php's SERVER_ADDR variable but no luck with that either. Though I think that's the way to go.
bjzielinski replied on at Permalink Reply
bjzielinski
Ok it does work now, I replaced the line with
define('BASE_URL', 'http://' . $_SERVER['HTTP_HOST']);
In the site.php file. I had to clear my cache and reload for it to work, but it works on both sides now. Thanks.