LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-03-2003, 10:54 AM   #1
chris
Member
 
Registered: Nov 2001
Location: Toronto, Canada
Distribution: CentOS 4
Posts: 66

Rep: Reputation: 15
Virtual Hosts!!


Hey guys,

I recall being able to configure vhosts a few years back but now with the slight changes in httpd I've been having a really hard time and getting frustrated. I've tried apache.org and have read docs, did searches on google but still I can't seem to get it right... could someone please help me??

#
# Use name-based virtual hosting.
#
NameVirtualHost 192.168.1.1
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
<VirtualHost 192.168.1.1>
ServerAdmin saruul@yahoo.com
DocumentRoot /home/httpd/html/saruul
ServerName saruul.homelinux.com
ErrorLog logs/saruul.homelinux.com-error_log
CustomLog logs/saruul.homelinux-access_log common
</VirtualHost>

These directives just bring me back to my default root directory and not to the one specified

Thanks! ;O)
 
Old 02-03-2003, 11:00 AM   #2
Wolven
Member
 
Registered: Jan 2003
Posts: 195

Rep: Reputation: 30
Try adding

ServerPath /home/httpd/html/saruul

in there and restarting.
 
Old 02-03-2003, 11:17 AM   #3
chris
Member
 
Registered: Nov 2001
Location: Toronto, Canada
Distribution: CentOS 4
Posts: 66

Original Poster
Rep: Reputation: 15
Thanks for the amazingly fast reply... I'll try that right now!
 
Old 02-03-2003, 11:20 AM   #4
chris
Member
 
Registered: Nov 2001
Location: Toronto, Canada
Distribution: CentOS 4
Posts: 66

Original Poster
Rep: Reputation: 15
I made the suggested changes and still the same thing... goes to the default root directory!
 
Old 02-03-2003, 12:39 PM   #5
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
Since you are using 192.168.1.1, I have a hunch that you have only one eth card and hence only one ip address.

If that is the case , you need not use ip based vhosts. Use name based instead, and create and entry each for all vhosts you need, default first.

NameVirtualHost *

<VirtualHost *>
ServerName xxx.net
ServerAdmin bob@xxx.net
DocumentRoot /var/www/html/
</VirtualHost>

<VirtualHost *>
ServerName mary.xxx.net
ServerAdmin mary@xxx.net
DocumentRoot /var/www/html/people/mary/
</VirtualHost>
 
  


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 On
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
virtual hosts, virtual ip's? kuplo Linux - Newbie 3 11-29-2005 09:44 PM
Help with Virtual Hosts? econnections Linux - Newbie 3 07-02-2005 01:39 PM
Virtual hosts Help carminejg3 Linux - Newbie 2 12-22-2004 03:47 PM
virtual hosts... Digital_Err0r Linux - Newbie 25 03-25-2004 04:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:58 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration