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: Using Apache for host mapping
Author
NogNeetMachinaal



Joined: 16 Feb 2014
Posts: 9
Location: Netherlands

PostPosted: Thu 24 Mar '16 21:58    Post subject: Using Apache for host mapping Reply with quote

Hi Everyone,

Is there a way to use Apache for 2-way host mapping of a website running as a virtual host?

For example a translation from:
    http://morpheus.dnsalias.net:15700/

Into (i.e. internal):
    http://somehost.local.net/

And v.v.

What I'm trying to accomplish:
The first one is the external host portion of a certain website. The goal is to have this translated to the internal host portion of the URL.
This allows me to troubleshoot site issues remotely for websites which are normally only available via the internal network.

Sofar, I have tried NAT translation on the router.
The router is a D-Link model DIR-868L (rev. B) and runs DD-WRT. However, NAT translation doesn't seem to work on "the way back". Meaning that the landing page is displayed after which the host portion is reverted back to the internal host name.

The Apache server is part of Ubuntu server 14.04.4-LTS and is updated to the latest version.
The websites are running on virtual hosts where each host has a separate IP address.

If somebody has a better way of doing this (other then a VPN), then please, do feel free to share.


Thank you - Will
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 29 Mar '16 10:16    Post subject: Reply with quote

In short

Listen 15700

<VirtualHost *:15700>
ServerName morpheus.dnsalias.net
<Location />
http://somehost.local.net/
ProxyPassReverse / http://somehost.local.net/
</Location>
</VirtualHost>

For sure that vhost can be also on port 80 or 443.
Back to top


Reply to topic   Topic: Using Apache for host mapping View previous topic :: View next topic
Post new topic   Forum Index -> Apache