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?
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?
try commenting out the base_url and dir_rel lines,
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.
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.
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.
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.