LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices



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

Rep: Reputation: 0
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 1.2.3.4]. I bought a domain [say bla.com] and edited the zonefile with these A records :

bla.com A 1.2.3.4
john A 1.2.3.4
* A 1.2.3.4

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 :
http://www.bla.com/john/
http://www.bla.com/tim/

but i want them to have :
http://john.bla.com
http://tim.bla.com

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)

and

- does anyone have an example how to do this or something similar to get me on the right track.

thanks in advance

Milo
 
Old 05-03-2003, 02:26 AM   #2
mcleodnine
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 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
 
Old 05-03-2003, 01:29 PM   #3
KennyK
Member
 
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.


<VirtualHost 192.168.0.200>
ErrorLog /home/mydomain/www/logs/error_log
ServerName forum.mydomain.com
ServerAdmin kenny@mydomain.com
CustomLog /home/mydomain/www/logs/access_log combined
DocumentRoot /home/mydomain/www/htdocs/forum
</VirtualHost>


Hope this helps
 
Old 05-03-2003, 02:32 PM   #4
cyberskye
Member
 
Registered: Feb 2003
Location: The City by the Bay
Posts: 116

Rep: Reputation: 15
Quote:
- do i need a seperate record for each user in the zonefile ? (a subdomain)
yes. point jon.blah.com and tim.blah.com 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 - 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.

Skye
 
Old 05-03-2003, 03:04 PM   #5
aero
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-02-2003, 12:58 AM   #6
CrazyToon
LQ Newbie
 
Registered: Jun 2003
Posts: 21

Rep: Reputation: 0
Lightbulb

You should go read the stuff on apaches website on vhosts. U can rewite the url and stuff.
http://httpd.apache.org/docs-2.0/vhosts/

also might be good to read:
http://httpd.apache.org/docs-2.0/vhosts/mass.html

2nd link is what i use for hosting.
 
  


Reply


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 07:29 AM
Apache/Virtual Hosts Help C-Squared Linux - General 9 08-04-2003 01:45 PM
Apache Virtual Hosts (again) scatcat Linux - General 1 10-17-2002 10:51 AM
Apache: Virtual hosts pk21 Linux - Software 15 10-08-2002 06:08 PM
apache virtual hosts jonfa Linux - General 1 06-04-2002 02:50 AM


All times are GMT -5. The time now is 03:55 AM.

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