I have a web server (with domain example.com) behind a firewall and all services are redirected to several internal machines. Now I´d like to have drupal on a internal machine with private IP and provide service to the Internet. All services are redirected using Iptables.
if I put www.example.com out of the intranet, my firewall redirects the request to a machine with private IP on port 80, via iptables.
If I put drupal.example.com:1080/drupal then my firewall redirects to another machine with private IP where I have installed drupal and I can see my drupal home page.
The problem comes when from out of intranet I click in a link of my drupal home page; I get the following error:
The requested URL /drupal/ was not found on this server.
Apache/1.3.26 Server at www.example.com Port 80
I´m sure the problem it´s related with the line:
$base_url = "http://drupal.example.com/drupal";
In fact, if I change that line for:
$base_url = "http://drupal.example.com:1080/drupal";
I can access my drupal home page (out of intranet) and click any link without problems. However now the problem arise on machines in the intranet, since when I click a link of my drupal home page for example:
http://drupal.example.com/drupal/?q=user
base_url try make the conection to port 1080, where I don´t have any service, since apache listen on port 80 in this machine.
In brief: