LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-13-2003, 09:22 PM   #1
CRUZN8R
LQ Newbie
 
Registered: Apr 2003
Location: Long Beach, WA
Distribution: RedHat 8.0
Posts: 4

Rep: Reputation: 0
Question Need help configuring virtual domains on home network


I need help configuring apache on a home network.

This is my network layout:
I have adsl with pppoe and one dynamic IP.
I have static IP assignments for each computer.

internet => dsl modem/router => 16 port switch =>
=> winxp pc
=> winxp pc
=> winxp pc
=> winxp pc
=> redhat 8.0 server

Mainly, I need the redhat 8.0 server to serve web pages to my lan for web developement perl, cgi, mysql, php, etc.
I need to be able to view virtual domains from my own lan, I do not need to host domains for the internet.

I can surf the net from the redhat 8.0 server, but I am having trouble setting up virtual domains.
I have apache 2.0.40 running, but the only domain that works is localhost apache test page.
If I setup a virtual domain and try to pull it up in a browser by IP I get "connection refused"
The httpd error_log shows:
[error] [client 192.168.0.10] Directory index forbidden by rule: /var/www/html/

I am fairly new to linux. Any help is appreciated.
 
Old 04-13-2003, 09:46 PM   #2
osfestus
Member
 
Registered: Feb 2003
Posts: 92

Rep: Reputation: 15
Well make sure that you have your document root set correctly for each virtual host directive. Then make sure that if you don't have the correct global index page set, that you have allowed directory indexing, other wise you will just get errors. If (for security reasons) you DO NOT wish to allow for directories to be indexed, just make sure you have a correctly named index page for each virtual hosts' document root, which in RH8 should be index.html. Second, whether you have IP based virtual hosting, or named based virtual hosting, you still need to be able to resolve the virtual domain names via DNS, because apache uses http headers from browser requests to determine which virtual server "answers" with the default index page. I am sure there is an easy work around for this, but I have always had to do this with DNS so I haven't learned of it. In any case, it isn't very hard to set up BIND on the RH8 box and create a couple of zones for your virtual domains. Hope I helped a bit.
 
Old 04-13-2003, 11:25 PM   #3
CRUZN8R
LQ Newbie
 
Registered: Apr 2003
Location: Long Beach, WA
Distribution: RedHat 8.0
Posts: 4

Original Poster
Rep: Reputation: 0
I enabled directory indexing in httpd.conf and that error is gone from the logs, but the virtual host still does not work.

document root is set correctly
/var/www/html/memberwiz
I have a index.html in the htdocs directory and directory is chown to the user memberwiz, the dir is chmod 755
/var/www/html/memberwiz

NameVirtualHost 192.168.0.22

<VirtualHost 192.168.0.22>
ServerAdmin root@localhost
DocumentRoot /var/www/html/memberwiz/htdocs
ServerName 192.168.0.22
DirectoryIndex index.php index.html index.htm index.shtml
TransferLog /var/www/html/memberwiz/logs/access_log
ErrorLog /var/www/html/memberwiz/logs/error_log
</VirtualHost>

I have not setup any DNS fir this virtual host, I did put a line in etc/host

192.168.0.22 membershipwizards.ptcc.com

But if I type http://192.168.0.22 in Mozilla on the RH server I still get "connection was refused when attemoting to contact 192.168.0.22"

Is this a DNS problem?

Thanks for any help.
 
Old 04-13-2003, 11:47 PM   #4
CRUZN8R
LQ Newbie
 
Registered: Apr 2003
Location: Long Beach, WA
Distribution: RedHat 8.0
Posts: 4

Original Poster
Rep: Reputation: 0
I sorta got is working

if I type at the terminal as root:

ifconfig eth0:1 192.168.0.22
route add 192.192.0.22 eth0:1

I can use the virtual host for that IP, but when I reboot the server, that entry is gone!

Any ideas how to make the setting stick?
 
Old 04-14-2003, 12:29 AM   #5
CRUZN8R
LQ Newbie
 
Registered: Apr 2003
Location: Long Beach, WA
Distribution: RedHat 8.0
Posts: 4

Original Poster
Rep: Reputation: 0
I got it working



I went into linuxconf and added the IP in "IP Aliases for Virtual Hosts"
Now when I reboot it still works.
 
  


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
Freeradius and Virtual Domains chinitobutnotchinese Linux - Security 0 06-29-2005 07:54 AM
Postfix and virtual domains nvargas Linux - Software 6 03-12-2004 02:35 PM
Virtual Domains on Sendmail??? Hein-ZA Linux - Networking 1 07-18-2003 09:39 AM
Sendmail Virtual Domains jmnovak Linux - Newbie 0 03-12-2003 10:49 AM
Virtual Domains gene_gEnie Linux - Networking 2 09-16-2001 01:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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