Re: [SLUG] Apache2 virtual hosts

From: Nicholas Finzer (nfinzer@gmail.com)
Date: Sat Jun 18 2005 - 14:30:32 EDT


Actually, Gentoo doesn't split them anymore, but if you haven't updated
recently, you may still have a version that splits them. In which case, I
found the easiest thing to do was :
 mv /etc/apache2/conf/apache2.conf /etc/apache2/httpd.conf
cat /etc/apache2/conf/commonapache2.conf >> /etc/apache2/httpd.conf

If you are using gentoo and update to the current single config file
version, apache will not start until you move to a single config file.
 Oh, and the config bit I sent earlier was from a Fedora box.
 NF
 On 6/18/05, R.G. Mayhue <rmayhue@tampabay.rr.com> wrote:
>
> On Saturday 18 June 2005 01:06 pm, Joe Brandt wrote:
> >
> > I have been attempting (unsuccessfully) to get
> > Apache2 configured so that that :
> > default serves up /var/www/html
> > www.hamsbeer.com <http://www.hamsbeer.com> serves up /var/www/html/hams
> > www.joedienterprises.com <http://www.joedienterprises.com> serves up
> /var/www/html/joedi
> >
> > Searching the docs on Name based Virtual Hosts
> > (http://httpd.apache.org/docs-2.0/vhosts/name-based.html) was not much
> > help as I did what I interpreted them to be saying and I can not get it
> > to work. All I have managed to accomplish is get 1 site up regardless
> > of name. I have made it functional again and copied the httpd.conf file
> > for your viweing pleasure.
> >
> > All help will be appreciated
> > Thank you in advance
> >
> > Joe Brandt S.S.T.G.I.T.
> > (Struggling self taught geek in training)
> >
>
> Are you using Gentoo? This looks like a Gentoo apache2.conf.
>
> Currently Gentoo splits the apache configs into 2 parts apache2.conf
> and commonapache2.conf. Since I couldn't see commonapache2.conf
> I'll have to assume it is correct. You would do better to put the
> following VirtualHost defines into conf/vhosts/Vhosts.conf. Its
> already included further up in the config.
>
> ------------ cut -------------
> NameVirtualHost *:80
>
> <VirtualHost *:80>
> DocumentRoot /var/www/html/joedi
> ServerName joedienterprises.com <http://joedienterprises.com>
> ServerAlias www.joedienterprises.com <http://www.joedienterprises.com>
> <Directory /var/www/html/joedi>
> Options +Indexes
> <IfModule mod_access.c>
> Order allow,deny
> Allow from all
> </IfModule>
> </Directory>
> </VirtualHost>
>
> <VirtualHost *:80>
> DocumentRoot /var/www/html/hams
> ServerName hamsbeer.com <http://hamsbeer.com>
> ServerAlias www.hamsbeer.com <http://www.hamsbeer.com>
> <Directory /var/www/html/hams>
> Options +Indexes
> <IfModule mod_access.c>
> Order allow,deny
> Allow from all
> </IfModule>
> </Directory>
> </VirtualHost>
> ------------ cut -------------
>
> That should get it working as long as the parts I couldn't see are
> correct.
>
> -- Rob
> -----------------------------------------------------------------------
> This list is provided as an unmoderated internet service by Networked
> Knowledge Systems (NKS). Views and opinions expressed in messages
> posted are those of the author and do not necessarily reflect the
> official policy or position of NKS or any of its employees.
>

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:15:28 EDT