LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 11-14-2007, 04:47 PM   #1
Kage6060
LQ Newbie
 
Registered: Nov 2005
Posts: 15

Rep: Reputation: 0
need help with httpd.conf


When someone types in www.scribner.org on my local box, Konqueror needs to bring up a file that says "Happy Holidays from scribner.org domain". I also need then same thing to happen when they type in www.scribner.net which will bring up a file that says "Happy Holidays from scribner.net domain". How can I do this using the httpd.conf file? Any help would be GREATLY APPRECIATED.
 
Old 11-14-2007, 05:22 PM   #2
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
Unless you own the scribner.org and scribner.net domains you will need to put an entry in your /etc/hosts file to point www.scribner.org and www.scribner.net to 127.0.0.1:

Code:
127.0.0.1       www.scribner.org
127.0.0.1       www.scribner.net
Now you will need to set up two Virtual Hosts inside httpd.conf:

Code:
NameVirtualHost *:80

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot /www/docs/scribner.net
    ServerName www.scribner.net
    ErrorLog logs/scribner.net-error_log
    CustomLog logs/scribner.net-access_log common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot /www/docs/scribner.org
    ServerName www.scribner.org
    ErrorLog logs/scribner.org-error_log
    CustomLog logs/scribner.org-access_log common
</VirtualHost>
HTH

Forrest
 
Old 11-16-2007, 03:05 PM   #3
Kage6060
LQ Newbie
 
Registered: Nov 2005
Posts: 15

Original Poster
Rep: Reputation: 0
still having trouble

The aliasing effect works. when I go to scribner.org it goes to the index.html, but when I type in scribner.net it doesn't go to index2.html. I put 2 records in the hosts file for each virtual host, and I put the following into my httpd.conf file

Code:
NameVirtualHost 192.168.10.80
 
 <VirtualHost 192.168.10.80>
 ServerName www.scribner.org
 DocumentRoot /www/scribner.org/index.html
 </VirtualHost>
 
 <VirtualHost 192.168.10.80>
 ServerName www.scribner.net
 DocumentRoot /www/scribner.net/index2.html
 </VirtualHost>
any ideas on how I can get scribner.org to display index.html AND get scribner.net to display index2.html?
 
Old 11-16-2007, 11:24 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

Follow-ups please to the original thread:
http://www.linuxquestions.org/questi...599648&pollid=
 
  


Closed Thread


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
Please amend apache conf/httpd.conf file please payjoe Linux - Newbie 7 09-21-2007 06:12 PM
Failed to start apache :Starting httpd: Syntax error on line 1027 of /etc/httpd/conf/ payjoe Linux - Newbie 3 09-21-2007 08:24 AM
Should I include srm.conf in httpd.conf in apache2? xpucto Linux - Software 3 02-16-2006 09:16 AM
saving changes to apache2/conf/httpd.conf file Zaius Linux - Newbie 6 01-10-2004 12:45 AM
httpd chokes on ScriptAlias line in Apache httpd.conf lhoff Linux - Software 1 07-14-2003 11:32 PM


All times are GMT -5. The time now is 03:38 PM.

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