I've been focusing on a drupal test site for some time, with a couple of virtual hosts setup such as this:
<VirtualHost *:80> ServerAdmin firstname.lastname@example.org DocumentRoot "/path/to/root" ServerName testsite1.example.com </VirtualHost>
I've been utilizing a modified host file to see all these test sites, like:
12...1 localhost 20.02.2.22 testsite1.example.com 20.02.2.22 testsite2.example.com 20.02.2.22 testsite3.example.com
It has labored fine, however now I have to send the websites to many people remotely who're not technical enough to change their very own host files and find out it the way in which I actually do.
It is possible to way I possibly could setup Apache to ensure that the url "http://20.02.2.22/testsite1" would toward testsite1.example.com internally? I'm using Drupal, and also the site setup must begin to see the "testsite1.example.com" to ensure that it may properly pick the instance to choose. I've been searching through apache rewrite, however i am a little of the newb only at that so any assistance is much appreciated.
testsite1.example.com are only resolved in your machine, which means you cannot redirect. You are able to setup proxy with mod_proxy. Hope this matches your needs:
<VirtualHost *:80> ServerAdmin email@example.com DocumentRoot "/path/to/root" ServerName testsite1.example.com ServerAlias 20.02.2.22 <Location /testsite1/> ProxyPass http://testsite1.example.com/ </Location> </VirtualHost>
The way in which I show my local test sites is a mix of Dynamic DNS and port-sending.
Internally, my Drupal website is at [my machine ip] or localhost.
I setup a totally free dynamic dns title to my IP after which on my small router, accept incoming demands on port to path to [my machine ip]
This way, they are able to see yoursite.dyndns.com, nevertheless its searching at the local copy.