LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 10-09-2003, 01:18 PM   #1
bnscomp
LQ Newbie
 
Registered: Oct 2003
Posts: 4

Rep: Reputation: 0
Configuring Virtual Hosts in Apache 2 w/ Mandrake Linux 9.1.


Good Afternoon All!

Hi, I currently run a web server running windows 2003 enterprise server, used primarily for IIS 6. However, frankly I am sick of microsoft and want to learn more about linux. I took that server offline last night, and installed mandrake linux 9.1. I like! However, having some issues configuring Virtual Hosts in the http2.conf file. Let give an example of a host I am trying to create:

<VirtualHost WEBSITEURL:81>
DocumentRoot /home/bnscomp/www
ServerSignature On
</VirtualHost>

The problem is, after making the changes and restarting apache, It will still point the site to /var/www/html. I just dont understand. Now, a few other things. The directory (ie. /home/bnscomp/www) has been created, and contains an index.html file. Also, due to my ISP blocking port 80, anyone typing WEBSITEURL, will then forward to WEBSITEURL:81. Which then arrives at my server.

Any assistence into this matter would be VERY much appreciated! Thanks in advance for all your help

--Brian Samson

P.S. Because this is my first thread it's not letting me type a url, so,
WEBSITEURL=
ww2.
blah
.com
 
Old 10-09-2003, 01:22 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Try the format:
Code:
NameVirtualHost *:80

<VirtualHost *:80>
    DocumentRoot /home/bnscomp/www
    ServerName www.bnscomp.com
<Directory "/home/bnscomp/www">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
</VirtualHost>
You only need:
NameVirtualHost *:80

Once then copy the VirtualHost section for each host.
 
Old 10-09-2003, 04:04 PM   #3
bnscomp
LQ Newbie
 
Registered: Oct 2003
Posts: 4

Original Poster
Rep: Reputation: 0
GREAT! Thanks a lot for the help! It works GREAT! Boy I am really starting to fall for the penguin! LOL. Anyways, one more thing. Is it possible to have the logs for each domain, saved in a different directory? If so, what would I have to add to the virtual hosts section? Thanks again!

~~ Brian
 
Old 10-10-2003, 12:20 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Take a look at the last secion on this page:
http://httpd.apache.org/docs-2.0/logs.html
 
  


Reply



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
Webpage loads slowly using virtual hosts in Apache 2.0 Linux Redhat 9 dste0713 Linux - General 0 01-21-2004 12:35 PM
Apache Virtual Hosts quozt Linux - General 3 10-15-2003 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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:01 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
Open Source Consulting | Domain Registration