Apache virtual hosts
i've been messing with it a bit but cant quite figure this out.
i have a dedicated server standing somewhere on the planet with a fixed ip [say 184.108.40.206]. I bought a domain [say bla.com] and edited the zonefile with these A records :
bla.com A 220.127.116.11
john A 18.104.22.168
* A 22.214.171.124
now my domain and all possible subdomains point to my webserver (latest stable version of apache), which is perfect.
in my webroot i have subfolders for some 'crew' people.
let's call em John and tim
now their homepages will be :
but i want them to have :
i can't seem to get this to work with VirtualHosts but i doubt it should be hard ?
I've tried searching google and the man pages but without any luck
:Pengy: so my question is :
- do i need a seperate record for each user in the zonefile ? (a subdomain)
- does anyone have an example how to do this or something similar to get me on the right track.
thanks in advance
they won't work very well if the name server can't resolve the domains for john.blah.com and tim.blah.com.
You need to have a working dns entry in the zone file of the name server you're using for blah.com
Here is an example of my subs.conf file that you will also need.
CustomLog /home/mydomain/www/logs/access_log combined
Hope this helps
Then create separate virtual hosts Containers for each sub domain. The docs for VHosting on the apache site are quite good.
If you are planning on adding more in the future, you might want to create a single, separate domain - crew.blah.com - then add subfolders for each new user - crew.blah.com/jon - that would make dns and httpd.conf maintenance a little easier.
Yes, you need to have a dns server pointing the other domain's to yr IP also... then separate the "waters" with a virtual host entry like the one KennyK posted
|All times are GMT -5. The time now is 06:47 PM.|