Mailinglist Archive: opensuse (4547 mails)

< Previous Next >
Re: [SLE] Setting up Apache virtual hosts under SuSE 9.1?
  • From: Preston Crawford <me@xxxxxxxxxxxxxxxxxxx>
  • Date: Tue, 18 May 2004 06:34:19 -0700
  • Message-id: <1084887258.11726.8.camel@xxxxxxxxxxxxxxxxx>
On Tue, 2004-05-18 at 06:02, poeml@xxxxxxxxxxx wrote:
> Thanks a lot, I'll pass it on to the author.
>
> Peter

Also, FWIW, I just went back into the HTTP applet and now my virtual
hosts are showing up. But only because I manually did the following.

Created a directory named "my_conf" in /etc/apache2/ and created a file
there named my.conf that includes an entry like the following...

NameVirtualHost 127.0.0.3

Then I edited /etc/sysconfig/apache2 to make the line with
APACHE_CONF_INCLUDE_DIRS read...
APACHE_CONF_INCLUDE_DIRS="/etc/apache2/my_conf"

Then created a file in /etc/apache2/vhosts.d/ named myvhost.conf with
the following in it.

<VirtualHost myvhost>
ServerAdmin root
ServerName myvhost
DocumentRoot "/srv/www/sites/myvhost"
</VirtualHost>

This works. And in the end this strangely then has the vhosts showing up
in the HTTP applet, which is weird since when I tried to use the HTTP
applet to create virtual hosts it just crammed the virtual host
configuration information at the bottom of
/etc/apache2/default-server.conf. Anyway, very strange behavior. Maybe
the applet should be by default creating individual files for each host
like I did. Obviously it recognizes the validity of them while it
doesn't recognize the validity of putting this information into
/etc/apache2/default-server.conf. Very strange.

In the end, either way, nothing would work until I turned a setting to
allow my browser to get to the host from my IP address. This may just be
a case of SuSE 9.1 being more tightly secured than past versions, but
this caused me a headache too as I'm used to just being able to setup
the virtual hosts and they just work. Maybe it's an Apache 2 vs. 1.3
thing. I don't know.

Either way it doesn't just work as expected out of the box unless you
are an apache expert.

Preston


< Previous Next >