LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-11-2001, 06:36 PM   #1
gomer1701ems
LQ Newbie
 
Registered: Feb 2001
Location: in front of a computer
Posts: 24

Rep: Reputation: 15
Question


I've just gotton Apache installed successfully. However, I can't get it to serve the right pages. By using webmin, i've set up four virtual servers. Two of the four point to one DocumentRoot, and the other two point to another DocumentRoot. When I type in my domain name, the default "Apache installation successful" page comes up. When I add the name of my HTML file at the end of the domain, the "404 error" page comes up. How do I configure the httpd.conf file to have each domain serve the files I want?

Thanks!

Gomer1701ems
 
Old 06-11-2001, 09:29 PM   #2
crabboy
Moderator
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
I'm not sure what you have wrong. Setting up the virtual servers is fairly easy. I just edit the file manually. Here is an example of my httpd.conf file's virtual server section. Note that your IP address always goes at the top. I am able to put any of the domain names followed by any page and it works correctly: ie. test.domainname.com/test5.html.

Double check you file manually and not through the webmin tool.

Restart the httpd(s) when you are done editing the file.

NOTE: Please ignore the http:// before the names below. They are stuck there by default when I post.
Code:
<VirtualHost 216.02.01.01>
    ServerAdmin dude@name.domainname.com
    DocumentRoot /home/apache/domainname
    ServerName http://www.domainname.com
#    ErrorLog /var/adm/access_log_bak
#    CustomLog logs/host.some_domain.com-access_log common
</VirtualHost>

<VirtualHost 216.02.01.01>
    ServerAdmin dude@dsl-216-02-01-01.telocity.com
    DocumentRoot /home/apache/dsl
    ServerName dsl-216-02-01-01.telocity.com
#    ErrorLog logs/host.some_domain.com-error_log
#    CustomLog logs/host.some_domain.com-access_log common
</VirtualHost>

<VirtualHost 216.02.01.01>
    ServerAdmin  dude@domainname.com
    DocumentRoot /home/apache/manual
    ServerName manual.domainname.com
#    ErrorLog logs/host.some_domain.com-error_log
#    CustomLog logs/host.some_domain.com-access_log common
</VirtualHost>

<VirtualHost 216.02.01.01>
    ServerAdmin  cooldude@cooldude.com
    DocumentRoot /home/cooldude/cooldude_site
    ServerName http://www.cooldude.com
    ErrorLog /home/cooldude/logs/error_log
    CustomLog /home/cooldude/logs/access_log common
</VirtualHost>

<VirtualHost 216.02.01.01>
    ServerAdmin  cooldude@cooldude.com
    DocumentRoot /home/cooldude/cooldude_site
    ServerName cooldude.com
    ErrorLog /home/cooldude/logs/error_log
    CustomLog /home/cooldude/logs/access_log common
</VirtualHost>

<VirtualHost 216.02.01.01>
    ServerAdmin  dude@domainname.com
    DocumentRoot /home/apache/mail
    ServerName mail.domainname.com
</VirtualHost>

<VirtualHost 216.02.01.01>
    ServerAdmin  dude@domainname.com
    DocumentRoot /home/dude/www/testpage
    ServerName test.domainname.com
</VirtualHost>

[Edited by crabboy on 06-11-2001 at 10:31 PM]
 
  


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
apache won't serve pages gvaught Linux - Networking 6 12-08-2004 09:37 PM
apache just won't serve flash.. help ! Mandangelo Programming 6 06-23-2004 06:56 AM
Apache Server won't serve up large files perrond Linux - Networking 4 06-21-2004 10:53 AM
Using Squid and Apache in order to better serve pages xbaez Linux - Networking 2 04-07-2004 05:26 PM
Apache & two webs to serve. navajo Linux - Newbie 3 06-05-2003 01:57 PM


All times are GMT -5. The time now is 07:53 AM.

Main Menu
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