Go Job Hunting at the LQ Job Marketplace
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-03-2003, 01:16 AM   #1
LQ Newbie
Registered: May 2003
Posts: 10

Rep: Reputation: Disabled
Question 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

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

Old 05-03-2003, 01:26 AM   #2
Senior Member
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
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
Old 05-03-2003, 12:29 PM   #3
Registered: Apr 2003
Location: California, USA
Distribution: Redhat 8.0, 9.0 Suse 9.0 Pro
Posts: 129

Rep: Reputation: 15
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
Old 05-03-2003, 01:32 PM   #4
Registered: Feb 2003
Location: The City by the Bay
Posts: 116

Rep: Reputation: 15
- 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.

Old 05-03-2003, 02:04 PM   #5
LQ Newbie
Registered: Apr 2003
Location: Portugal
Distribution: VMware 4.0 RedHat 9.0
Posts: 29

Rep: Reputation: 15
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
Old 06-01-2003, 11:58 PM   #6
LQ Newbie
Registered: Jun 2003
Posts: 21

Rep: Reputation: 0

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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories jerryasher Linux - Software 7 02-18-2007 06:29 AM
Apache/Virtual Hosts Help C-Squared Linux - General 9 08-04-2003 12:45 PM
Apache Virtual Hosts (again) scatcat Linux - General 1 10-17-2002 09:51 AM
Apache: Virtual hosts pk21 Linux - Software 15 10-08-2002 05:08 PM
apache virtual hosts jonfa Linux - General 1 06-04-2002 01:50 AM

All times are GMT -5. The time now is 11:28 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration