LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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


Reply
  Search this Thread
Old 11-01-2004, 09:17 PM   #1
knightdog
LQ Newbie
 
Registered: Oct 2004
Posts: 12

Rep: Reputation: 0
vhost on fc2 install. defaults to 1 vhost only


running fc2 fresh install on dell optiplex gz115. i can not get vhosts to resolve. here is my httpd.conf vhost section:

xxxx to replace .com sorry very first post and do not meet the 5 post limit with url's

### Section 3: Virtual Hosts
#
NameVirtualHost *:85
#
<VirtualHost *:85>
ServerAdmin knightdog@hotmailXXXX
DocumentRoot /var/www/html/jammie-knight.no-ipxxxx/
ServerName jammie-knight.no-ipxxxx
ServerAlias *.jammie-knight.no-ipxxxx
DirectoryIndex index.html
<Directory "var/www/html/jammie-knight.no-ipxxxx">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
#
<VirtualHost *:85>
ServerAdmin knightdog@hotmailxxxx
DocumentRoot /var/www/html/knightdog.no-ipxxxx/
ServerName knightdog.no-ipxxxx
ServerAlias *.knightdog.no-ipxxxx
DirectoryIndex index.html
<Directory "var/www/html/knightdog.no-ipxxxx">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
#
<VirtualHost *:85>
ServerAdmin knightdog@hotmailxxxx
DocumentRoot /var/www/html/bev-knight.no-ipxxxx/
ServerName bev-knight.no-ipxxxx
ServerAlias *.bev-knight.no-ipxxxx
DirectoryIndex index.html
<Directory "var/www/html/bev-knight.no-ipxxxx">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>


i am behind a router with port forwarding on 85. if you type in any of the servernames it will all resolve to jammie-knight.no-ipxxxx. i am using no-ipxxxx and have it masking the url and port forwarding. if you type in the ip only(dynamic so only as good as the provider) 65.184.248.43:85 then it will resolve to the home page of jammie, if you type in 65.184.248.43:85/knightdog.no-ipxxxx it will tell you page can not be found and examining the error log it will tell you:
File does not exist: /var/www/html/jammie-knight.no-ipxxxx/knightdog.no-ipxxxx

I have commented out the welcome.conf file in the conf.d file also..

i have read, and tried to beat this into submission, but it is winning, any help would be greatly appreciated. thanks.

Dennis
 
Old 11-02-2004, 08:49 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
If the server " jammie-knight.no-ipxxxx" is also configured as the main server outside of the virtual host, the virtual host isn't necessarily needed for that one. And I'm assuming after you've made the changes your restarting apache? Does the service no-ip allow virtual hosts? You might have to input them on their end as well.
 
Old 11-02-2004, 09:57 AM   #3
knightdog
LQ Newbie
 
Registered: Oct 2004
Posts: 12

Original Poster
Rep: Reputation: 0
here is the updated httpd.conf

Listen 85


### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# Use name-based virtual hosting.
#
NameVirtualHost *:85
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#

<VirtualHost *:85>

ServerAdmin knightdog@hotmail.com

DocumentRoot /var/www/html/jammie-knight.no-ip.com/

ServerName jammie-knight.no-ip.com

ServerAlias *.jammie-knight.no-ip.com

DirectoryIndex index.html
<Directory "var/www/html/jammie-knight.no-ip.com">

AllowOverride All

Order allow,deny

Allow from all

</Directory>

</VirtualHost>

#

<VirtualHost *:85>

ServerAdmin knightdog@hotmail.com

DocumentRoot /var/www/html/knightdog.no-ip.com/

ServerName knightdog.no-ip.com

ServerAlias *.knightdog.no-ip.com

DirectoryIndex index.html
<Directory "var/www/html/knightdog.no-ip.com">

AllowOverride All

Order allow,deny

Allow from all

</Directory>

</VirtualHost>

#

<VirtualHost *:85>

ServerAdmin knightdog@hotmail.com

DocumentRoot /var/www/html/bev-knight.no-ip.com/

ServerName bev-knight.no-ip.com

ServerAlias *.bev-knight.no-ip.com

DirectoryIndex index.html
<Directory "var/www/html/bev-knight.no-ip.com">

AllowOverride All

Order allow,deny

Allow from all

</Directory>

</VirtualHost>

Last edited by knightdog; 11-12-2004 at 01:49 PM.
 
Old 11-02-2004, 12:44 PM   #4
knightdog
LQ Newbie
 
Registered: Oct 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Question do i need to only use Vhost.conf

I just found one thread that said apache 2. only uses Vhost.conf. Am i putting in the correct data just in the wrong place? should i cut the bottom part of the httpd.conf and paste it into a vhost.conf file?
 
Old 11-02-2004, 06:33 PM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Re: do i need to only use Vhost.conf

Quote:
Originally posted by knightdog
I just found one thread that said apache 2. only uses Vhost.conf. Am i putting in the correct data just in the wrong place? should i cut the bottom part of the httpd.conf and paste it into a vhost.conf file?
That's worth a try but I doubt its going to solve the problem. It should be read from the actual config as well, unless its reading from the vhost file and knocking off what it just read in the main config.
 
Old 11-02-2004, 09:33 PM   #6
knightdog
LQ Newbie
 
Registered: Oct 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Unhappy here is an updated httpd.conf

I have been given some good pointers and have made some adjustments. but it still just defaults to jammie-knight.no-ip.com. any suggestions?


### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# Use name-based virtual hosting.
#
NameVirtualHost *:85
#
<VirtualHost *:85>
DocumentRoot /var/www/html/jammie-knight.no-ip.com
ServerName www.jammie-knight.no-ip.com
</VirtualHost>
#
<VirtualHost *:85>
ServerAdmin knightdog@hotmail.com
DocumentRoot /var/www/html/knightdog.no-ip.com
ServerName www.knightdog.no-ip.com
ServerAlias knightdog.no-ip.com
<Directory "/var/www/html/knightdog.no-ip.com">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
#
<VirtualHost *:85>
ServerAdmin knightdog@hotmail.com
DocumentRoot /var/www/html/bev-knight.no-ip.com
ServerName www.bev-knight.no-ip.com
ServerAlias bev-knight.no-ip.com
<Directory "/var/www/html/bev-knight.no-ip.com">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

Last edited by knightdog; 11-12-2004 at 01:48 PM.
 
Old 11-03-2004, 04:44 PM   #7
knightdog
LQ Newbie
 
Registered: Oct 2004
Posts: 12

Original Poster
Rep: Reputation: 0
any one else got any suggestions?

looking at access-logs if you type in http://65.184.248.43:85/knightdog.no-ip.com
you will get the following error in the error log for jammie-knight.no-ip.com

[Wed Nov 03 17:39:53 2004] [error] [client 65.184.248.43] File does not exist: /var/www/html/jammie-knight.no-ip.com/knightdog.no-ip.com


 
Old 11-08-2004, 08:21 PM   #8
knightdog
LQ Newbie
 
Registered: Oct 2004
Posts: 12

Original Poster
Rep: Reputation: 0
only the first vhost will resolve

If you type in bev-knight.no-ip.com you will get the correct web page.
if you type in jammie-knight.no-ip.com you will get the web page for bev-knight.....
any suggestions? here is the httpd.conf:


# Listen: Allows you to bind Apache to specific IP addresses and/or
Listen 85


### Section 3: Virtual Hosts
#
# Use name-based virtual hosting.
#
NameVirtualHost *:85
#
<VirtualHost *:85>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /var/www/html/bev-knight.no-ip.com
ServerName www.bev-knight.no-ip.com
ServerAlias bev-knight.no-ip.com
DirectoryIndex index.html
<Directory "var/www/html/bev-knight.no-ip.com">

AllowOverride All

Order allow,deny

Allow from all

</Directory>
ErrorLog logs/bev-knight.no-ip.com_11_08-error_log
CustomLog logs/bev-knight.no-ip.com_11_08-access_log common
</VirtualHost>

<VirtualHost *:85>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /var/www/html/jammie-knight.no-ip.com/
ServerName www.jammie-knight.no-ip.com
ServerAlias jamie-knight.no-ip.com
DirectoryIndex index.html
ErrorLog logs/jammie-knight.no-ip.com_11_08-error_log
CustomLog logs/jammie-knight.no-ip.com_11_08-access_log common
<Directory "var/www/html/jammie-knight.no-ip.com">

AllowOverride All

Order allow,deny

Allow from all

</Directory>
</VirtualHost>

Last edited by knightdog; 11-12-2004 at 01:46 PM.
 
Old 11-12-2004, 01:45 PM   #9
knightdog
LQ Newbie
 
Registered: Oct 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Ok, I figure that my httpd is basically set up correct because if i use these 3 ports then all 3 web sites will work as needed(see the below bottom of my httpd.conf). What i need to figure out is why if i tell it to listen to only port 85, and leave them all on port 85 do they automatically default to the first Vhost. Any suggestions on tracking down what is being sent from the dynamic ip updater to my router to my server???? is the redirecting service changing it so apache can not understand it? I saw where dyndns is mentioned, are they any good and what install did you use? im runnig fc2.

anyone else using a dynamic updater? and what type of router are you using?

httpd.conf:
listen 84
listen 85
listen 86
#
NameVirtualHost *:84
NameVirtualHost *:85
NameVirtualHost *:86
#
<VirtualHost *:86>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /var/www/html/bev-knight.no-ip.com
ServerName www.bev-knight.no-ip.com
ServerAlias bev-knight.no-ip.com
DirectoryIndex index.html
<Directory "var/www/html/bev-knight.no-ip.com">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog logs/bev-knight.no-ip.com_11_08-error_log
CustomLog logs/bev-knight.no-ip.com_11_08-access_log common
</VirtualHost>
#
<VirtualHost *:84>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /var/www/html/jammie-knight.no-ip.com/
ServerName www.jammie-knight.no-ip.com
ServerAlias jamie-knight.no-ip.com
DirectoryIndex index.html
ErrorLog logs/jammie-knight.no-ip.com_11_08-error_log
CustomLog logs/jammie-knight.no-ip.com_11_08-access_log common
<Directory "var/www/html/jammie-knight.no-ip.com">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:85>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /var/www/html/bev-knight.no-ip.com
ServerName www.bev-knight.no-ip.com
ServerAlias knightdog.no-ip.com
DirectoryIndex index.html
<Directory "var/www/html/knightdog.no-ip.com">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog logs/knightdog.no-ip.com_11_08-error_log
CustomLog logs/knightdog.no-ip.com_11_08-access_log common
</VirtualHost>
 
  


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
How to setup a vhost? runeleader Linux - Networking 5 11-15-2005 11:35 AM
Apache: Alias is working on ssl vhost but not on mass vhost jonavogt Linux - Software 0 06-07-2005 02:05 PM
apache 1.3 vhost z4Rilla Linux - Software 0 08-03-2003 06:44 AM
Vhost problem Mil0 Linux - Networking 1 05-11-2003 06:06 PM
vhost jk77 Linux - General 0 02-26-2002 04:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:22 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