vhosts

This is a discussion on vhosts within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi RedHat 9 NIC connected on a Efficient Networks router on a static IP (192.168.2.11) router's ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-30-2005
Speedy Gonzales
 
Posts: n/a
Default vhosts

Hi

RedHat 9
NIC connected on a Efficient Networks router on a static IP (192.168.2.11)

router's gateway IP is 192.168.2.1 and external IP is dynamic (Sympatico
Bell) let's say it's 48.24.125.135

some lines in httpd.conf are:

listen *:80
servername home.server.com
documentroot /var/www/html/
namevirtualhost *
<virtualhost *>
serveradmin root@localhost
servername localhost
serveralias localhost
loglevel debug
hostnamelookups off
</virtualhost>

<virtualhost *>
documentroot /var/www/html/site1
serveradmin root@localhost
Servername home.site1.com
serveralias site1
</virtualhost>


etc/hosts has
127.0.0.1 localhost.localdomain localhost
127.0.0.1 home.site1.com site1

in the network config utility under DNS I have
Host Name localhost.localdomain
DNS primary 192.168.2.1
DNS secondary
DNS third
DNS search path no-domain-set.bellcanada



when I run httpd it exits with this:
[error] virtualhost _default_:443 -- mixing * ports and non-* ports with a
namevirtualhost address is not supported, proceeding with undefined results

What's wrong !

I want to be able to access the site by typing http://home.site1.com and
reach the site from any computer on the local network or from remote ones.

Thanks


  #2 (permalink)  
Old 01-31-2005
Speedy Gonzales
 
Posts: n/a
Default Re: vhosts


"Davide Bianchi" <davideyeahsure@onlyforfun.net> a écrit dans le message de
news:slrncvrijf.14p.davideyeahsure@fogg.onlyforfun .net...
> On 2005-01-30, Speedy Gonzales <adress@unknown.com> wrote:
> > [error] virtualhost _default_:443 -- mixing * ports and non-* ports with

a
>
> It sounds like you have somewhere definde SSL without configuring it.
> Check your configuration.
>



httpd.conf was loading ssl.conf which used port 443 so I removed the
SSL.CONF file from the httpd/conf.d directory.

It removed the message. But now I have :

(98)Address already used: make_sock: could not bind to address 0.0.0.0:80 no
listening sockets available, shutting down

my httpd conf file says

Listen *:80

I changed it to Listen 80 and it did nothing.



  #3 (permalink)  
Old 01-31-2005
Martin Kissner
 
Posts: n/a
Default Re: vhosts

Speedy Gonzales wrote :
>
> "Davide Bianchi" <davideyeahsure@onlyforfun.net> a écrit dans le message de
> news:slrncvrijf.14p.davideyeahsure@fogg.onlyforfun .net...
>> On 2005-01-30, Speedy Gonzales <adress@unknown.com> wrote:
>> > [error] virtualhost _default_:443 -- mixing * ports and non-* ports with

> a
>>
>> It sounds like you have somewhere definde SSL without configuring it.
>> Check your configuration.
>>

>
>
> httpd.conf was loading ssl.conf which used port 443 so I removed the
> SSL.CONF file from the httpd/conf.d directory.
>
> It removed the message. But now I have :
>
> (98)Address already used: make_sock: could not bind to address 0.0.0.0:80 no
> listening sockets available, shutting down
>
> my httpd conf file says
>
> Listen *:80
>
> I changed it to Listen 80 and it did nothing.


Try to use port 8080 to see if your problem ist related to this kind of
stuff.

If else, how about commenting out all this Listen-stuff for now.
It's not mandatory.
If this is not sufficient, I'd also get rid of the vHosts and try to get
the primary DocumentRoot working.
If you have webspace to put your httpd.conf file on, please do so and
post the address. I'll compare with mine then and try to help.

Regards
Martin

--
perl -e 'print 7.74.117.115.116.11.32.13.97.110.111.116.104.101.1 14.11
..32.13.112.101.114.108.11.32.13.104.97.99.107.101 .114.10.7'
  #4 (permalink)  
Old 01-31-2005
Speedy Gonzales
 
Posts: n/a
Default Re: vhosts


"Davide Bianchi" <davideyeahsure@onlyforfun.net> a écrit dans le message de
news:slrncvsfqc.2e9.davideyeahsure@fogg.onlyforfun .net...
> On 2005-01-31, Speedy Gonzales <adress@unknown.com> wrote:
> > (98)Address already used: make_sock: could not bind to address

0.0.0.0:80 no
> > listening sockets available, shutting down

>
> Do you have another apache or web server already running?


Thanks Davide

I restarted the PC and the error vanished. I looks like httpd -k restart was
not enough.

Now, on the linux keyboard only I can access the default page of apache and
in fact, any address beginning with home. goes to the default page unless I
type http://localhost/site1/ .

I can't reach any site on the linux box with any other box in the house. but
that I'll ask for help later.

here's part of the conf.

serverroot /etc/httpd
documentroot /var/www/html

every vhost has
documentroot /var/www/html/site

after the vhosts is
<directory "/">
options followsimlinks
allowoverwride none
</directory>
<directory "/var/www/html">
options indexes includes followsymlinks
allowoverride none
allow from from all
order allow,deny
</directory>



  #5 (permalink)  
Old 01-31-2005
Speedy Gonzales
 
Posts: n/a
Default Re: vhosts

Hi Martin

I tought that because the SSL service was shut down it was shut down, but
apache was loading it in its config. I read later that SSL couldn't be
activated with name vhosts. That produced the error.

> > (98)Address already used: make_sock: could not bind to address

0.0.0.0:80 no
> > listening sockets available, shutting down
> >
> > Listen *:80
> >
> > I changed it to Listen 80 and it did nothing.

>

As for the other error, I tought that restarting Linux should be enough. NO
I had to shut down the box and restart it. And it did the job.

But now there's a vhost conf issue I think. CF re: to Davide.

Thanks


  #6 (permalink)  
Old 01-31-2005
Speedy Gonzales
 
Posts: n/a
Default Re: vhosts

Hi Davide

> > I can't reach any site on the linux box with any other box in the house.

but
> > that I'll ask for help later.

>
> If you can ping the ip of the machine, try opening the site using
> http://ip.of.the.server, if still doesn't work maybe you have a firewall
> blocking the connections.


The local ip is 192.168.2.11 and is pingable.
But the problem is that I can't use the vhosts addresses to reach the sites.
http://home.site1.com will lead to the default apache page I can only reach
site1 by typing http://localhost/site1/ and only on the linux box itself.


> > every vhost has
> > documentroot /var/www/html/site

>
> ....and? What's the problem with this?
>
> Davide
>
>
> --
> I'm locked in a maze of little projects, all of which suck.
> -- Chris "Saundo" Saunderson on alt.sysadmin.recovery



  #7 (permalink)  
Old 02-01-2005
iMedia
 
Posts: n/a
Default Re: vhosts

Your router is probably using port 80 for it's web admin interface. I
came across the same issue in the Apache mail-list, however there was
no decent resolution mentioned.

  #8 (permalink)  
Old 02-01-2005
Speedy Gonzales
 
Posts: n/a
Default Re: vhosts

Hi iMedia

I solved one problem.

I had namevirtualhost 128.0.0.1 and each vhost had the same address.

I changed that to the linux box internal IP (192.168.2.11) in the router.
I did the same for every vhost in the Hosts and httpd.conf files.

Now I can call any of these vhosts by typing their alias or their name
address but only on the linux kb.

If I type http://home.site1.com on any other box of the local network I
recieve the "Impossible d'afficher la page" error mesg.

The router I use is the Efficient Networks 6300 sold by Bell Sympatico. It's
a modem-router.

In it's admin interface I have forwarded http on port 80 requests to
192.168.2.11 (the linux box's IP) and demilitarized it's IP. It shouldn't
obstruct the way to Apache !?

Any ideas ?


  #9 (permalink)  
Old 02-03-2005
iMedia
 
Posts: n/a
Default Re: vhosts

I'm not too experienced in DNS and this is where I believe you next
problem lies.

When hitting URL http://home.site.com/ off the server your browser is
checking your ISP's DNS for name resolution (URL > IP) which then goes
up the chain of command and finds nothing. I'm assuming you do not have
http://home.site.com/ registered and it's NOT pointing to your external
IP. Therefor your not even getting to your server to resolve the
vhosts.

Who is serving DNS for the above URL? It needs to be a registrar that
allows you to point this URL to your external IP 48.24.125.135 (as
mentioned above) and be able to update it if re-issued. Take a look at
http://dyndns.org/

Without external DNS on that URL, pointing to your external IP, you
will only be able to hit the server via the IP address.

Try this:
Create a basic index.html page for you server's www document root, go
to another box and hit your external IP. That should get you the
index.html page. But that's it.

Again: before you can use name resolution, get a DNS service to resolve
a domain to your external IP.

http://n1.domain.xxx/ : external IP
http://n2.domain.xxx/ : external IP

then you can register any domain and set DNS to http://n1.domain.xxx/
and http://n2.domain.xxx/

then you can set your vhost config to accept the other domains

I hope on the right track here.
As far as "intra-nets", I don't have experience in that, yet.

  #10 (permalink)  
Old 02-03-2005
Speedy Gonzales
 
Posts: n/a
Default Re: vhosts

Hi

> up the chain of command and finds nothing. I'm assuming you do not have
> http://home.site.com/ registered and it's NOT pointing to your external


None is registered. There are 3 sites actually. Genealogy.

> Who is serving DNS for the above URL? It needs to be a registrar that
> allows you to point this URL to your external IP 48.24.125.135 (as
> mentioned above) and be able to update it if re-issued. Take a look at
> http://dyndns.org/



>
> Without external DNS on that URL, pointing to your external IP, you
> will only be able to hit the server via the IP address.
>
> Try this:
> Create a basic index.html page for you server's www document root, go
> to another box and hit your external IP. That should get you the
> index.html page. But that's it.


That's part of the problem. With the IP change I made I can reach all 3
sites but only by the linux kb. None of the other pc on the lan can connect
to the sites. As long as I know, my DNS setting is ok since I can type
http://home.site1.com on the linux kb and reach the site but there's
something blocking the other computers to access them. And since they are
all connected to the router and I can ping all of the boxes or telnet the
Linux box with any of the other local boxes, I conclude that the router's
firewall is the problem.

Another thing. Let's assume that my external IP is 1.2.3.4 (dynamic) and the
internal is 192.168.2.10 (static). Before I buy the router, I was connected
on a modem-cable (Videotron). On the Linux browser, I could type
http://1.2.3.4/site1/www and reach the site by going in its directory. Now,
with the router, if I type the same address I recieve a logon alert (the
same as for logging in the admin software of the router) asking for my
username and pw. And it won't accept any real username and/or pw I type
wether it's Linux's, Apache's or the router's ones.

If I point Apache to that 1.2.3.4 IP it won't even start.

Another point too, not pertaining to Apache but, I can't have any local or
remote voice contact in Messenger since the router is there. I had it
configured with the help of a Sympatico service supervisor but it won't
work.

So I think my conclusion is right : that router is wrong. What do you think
of that ?

Have you ever heard of such a problem with a router ?

>
> Again: before you can use name resolution, get a DNS service to resolve
> a domain to your external IP.


That will be the next step when the local aspect is solved.



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:47 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0