In httpd.conf I've got
Include /etc/apache2/vhosts.d/*.conf
telling apache to look for virtual host configuration files in that
directory. That seems to work OK.
In listen.conf I've got
Listen 80
Listen 8008
and
NameVirtualHost {the IP number}:8008
In my vhosts.d directory I've got two files. One, for the main
website, has
<VirtualHost *:80>
ServerName {the domain name}
DocumentRoot /srv/www/htdocs/{site directory}
etc.
This seems to work OK and sends visitors to the right place when they
request the main address.
I also wanted to have a separate site under 8008, so in a second file
in vhosts.d I say
<VirtualHost {the IP number}:8008>
DocumentRoot /srv/www/htdocs/{other site directory}
ServerName {the domain name}:8008
</VirtualHost>
But requests to the domain name with port 8008 and to the IP number
with port 8008 get no response.
I've tried every variation of address and IP number I can think of.
Can some kind person please tell me where I'm going wrong?
Cheers
Fred
Here is that doc:
http://httpd.apache.org/docs/2.0/vhosts/examples.html#port
> In listen.conf I've got
>
> Listen 80
> Listen 8008
>
> and
>
> NameVirtualHost {the IP number}:8008
In my listen.conf I find that section as an annotation:
# Use name-based virtual hosting
#
# - on a specified address / port:
#
#NameVirtualHost 12.34.56.78:80
#
# - name-based virtual hosting:
#
#NameVirtualHost *:80
#
# - on all addresses and ports. This is your best bet when you are on
# dynamically assigned IP addresses:
#
#NameVirtualHost *
Are you doing name-based virtual hosting?
> I also wanted to have a separate site under 8008, so in a second file
> in vhosts.d I say
>
> <VirtualHost {the IP number}:
> ServerName {the domain name}:8008
In the given url above they don't write a port here in the end.
But here: <VirtualHost {the IP number}:8008>
> But requests to the domain name with port 8008 and to the IP number
> with port 8008 get no response.
Try to set a firewall rule allowing access to your machine on port
8008.
> Are you doing name-based virtual hosting?
I am not sure about that.
> Try to set a firewall rule allowing access to your machine on port
> 8008.
Another thing I just found out:
I had to set up my router aswell!
Do you use any routers as "gateway" to the www?
Then you have to add probably a virtual server on your private static
ip with port 8008/8008.
It sounds like a firewall problem. Check if your httpd is listening on
port 8008 (netstat -an | grep 8008 will tell you) and if it is, check
if you have a firewall that prevent connections on port 8008.
Davide
Fred