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 |
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.
|
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> |
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?
|
Re: do i need to only use Vhost.conf
Quote:
|
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> |
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 :scratch: |
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.....:confused: 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> |
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> |
All times are GMT -5. The time now is 05:39 AM. |