Blainesea0tter
asked on
apache virtual hosts 2.2 with vhosts.d not working
I'm trying to configure apache virtual hosts on a suse 11.0 server. I edit the httpd.conf file to reflect the files under the vhost.d directory and apache continues to display the default web page no matter which virtual host I browse to.
DNS has been set to see the same IP address for all the hosts (three to start with) and the httpd2 -S confirms config is OK, but to the same default virtual host page.
I've tried a number of variations and the doc files up at apache.org don't seem to cover this new(er) version of apache.
I have googled this till I've run out of links. Any help would be appreciated.
Thanks!
Blaine
DNS has been set to see the same IP address for all the hosts (three to start with) and the httpd2 -S confirms config is OK, but to the same default virtual host page.
I've tried a number of variations and the doc files up at apache.org don't seem to cover this new(er) version of apache.
I have googled this till I've run out of links. Any help would be appreciated.
Thanks!
Blaine
ASKER
Ryder,
Thanks for the post. It was helpful, but it's the same format as the rest of the doc I've seen so far. In that it doesnt address the new format of the modularization of the virtualization of hosts in apache 2.2.x.
Close though!
Thanks again!
Blaine
Thanks for the post. It was helpful, but it's the same format as the rest of the doc I've seen so far. In that it doesnt address the new format of the modularization of the virtualization of hosts in apache 2.2.x.
Close though!
Thanks again!
Blaine
Interesting I use apache server 2.2.8 would you be able to attach a link of the "new format of the modularization of the virtualization of hosts" alway happy to learn new things
thank you
thank you
ASKER
Yup,
You're correct. I'm using 2.2.4 and the virtual hosting section I see looks totally different from your code. You know more than I about this, I'm sure.
Attached is the httpd.conf virtual host section and one of the vhost.conf files. Coming right up!
I was trying to describe what is to me a very complex environment. From the sounds of things, you may be able to help me. I'm only an egg...
Thanks!
Blaine
You're correct. I'm using 2.2.4 and the virtual hosting section I see looks totally different from your code. You know more than I about this, I'm sure.
Attached is the httpd.conf virtual host section and one of the vhost.conf files. Coming right up!
I was trying to describe what is to me a very complex environment. From the sounds of things, you may be able to help me. I'm only an egg...
Thanks!
Blaine
### Virtual server configuration ############################################
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs-2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
Include /etc/apache2/vhosts.d/*.conf
# Note: instead of adding your own configuration here, consider
# adding it in your own file (/etc/apache2/httpd.conf.local)
# putting its name into APACHE_CONF_INCLUDE_FILES in
# /etc/sysconfig/apache2 -- this will make system updates
# easier :)
<VirtualHost *>
DocumentRoot "/srv/www/silentpartnerstech.com/htdocs"
<Directory "/srv/www/silentpartnerstech.com/htdocs">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
everyone is an egg somehow
the important part is
NameVirtualHost 0.0.0.0:80 # this command basically leads all your VirtualHosts
then you just keep adding VirtualHost hosts from there using the
<VirtualHost *:80> # like in your conf file however the port is important
"<VirtualHost *>" by alone tends to cause trouble
how about trying
NameVirtualHost 0.0.0.0:80
<VirtualHost *:80>
DocumentRoot "/srv/www/silentpartnerste ch.com/htd ocs"
ServerName yourdomain.com
ServerAlias www.yourdomain.com
ServerAdmin webmaster@yourdomain.com
<Directory "/srv/www/silentpartnerste ch.com/htd ocs">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
the important part is
NameVirtualHost 0.0.0.0:80 # this command basically leads all your VirtualHosts
then you just keep adding VirtualHost hosts from there using the
<VirtualHost *:80> # like in your conf file however the port is important
"<VirtualHost *>" by alone tends to cause trouble
how about trying
NameVirtualHost 0.0.0.0:80
<VirtualHost *:80>
DocumentRoot "/srv/www/silentpartnerste
ServerName yourdomain.com
ServerAlias www.yourdomain.com
ServerAdmin webmaster@yourdomain.com
<Directory "/srv/www/silentpartnerste
allow from all
Options +Indexes
</Directory>
</VirtualHost>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I find it easier just to make everything virtual servers and then make a default virtual server to catch anything else that is not configured in the DNS
I will attached my apache conf files I hope it helps
Ryder
Open in new window