-   Linux - Software (
-   -   Apache virtual hosts (

Mil0 05-03-2003 01:16 AM

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]. I bought a domain [say] and edited the zonefile with these A records : A
john A
* A

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


mcleodnine 05-03-2003 01:26 AM

they won't work very well if the name server can't resolve the domains for and

You need to have a working dns entry in the zone file of the name server you're using for

KennyK 05-03-2003 12:29 PM

Here is an example of my subs.conf file that you will also need.

ErrorLog /home/mydomain/www/logs/error_log
CustomLog /home/mydomain/www/logs/access_log combined
DocumentRoot /home/mydomain/www/htdocs/forum

Hope this helps

cyberskye 05-03-2003 01:32 PM


- do i need a seperate record for each user in the zonefile ? (a subdomain)
yes. point and to the same public addy

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 - - then add subfolders for each new user - - that would make dns and httpd.conf maintenance a little easier.


aero 05-03-2003 02:04 PM

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

CrazyToon 06-01-2003 11:58 PM

You should go read the stuff on apaches website on vhosts. U can rewite the url and stuff.

also might be good to read:

2nd link is what i use for hosting.

All times are GMT -5. The time now is 07:34 PM.