Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Did Apache change everything? (Setting up virtual hosts)



Dave M G <dave@example.com> writes:

> When it comes to naming virtual hosts, what I used to do was simply open
> up /etc/apache2/httpd.conf and edit it.
>
> This time, though, when I opened /etc/apache2/httpd.conf, it was
> suspiciously empty. 

The name on Ubu/Deb is changed to apache2.conf (dunno why they still put the
empty httpd.conf file in there).

> So I looked on line, and now it seems everything is handled in a
> directory called /etc/apache2/sites-available and basically all the
> configurations are now done in a different way.

The files in sites-available are just read into the main config using an
"include" directive". 

   Include /etc/apache2/sites-enabled/

You can still put your virtual hosts directly into the apache2.conf
file. This will probably keep things simpler if you only have a few
sites to deal with. Basically just do what you did before, but do it in
apache2.conf instead of httpd.conf

> I made an effort to figure out how to do this, and went through many
> variants of new settings that did not work.
>
> <VirtualHost *>
>         ServerName www.local_site.com


Do you have a line somewhere in apache2.conf like the following?

  NameVirtualHost *

If you put the the virtual host configs into apache2.conf, that line
should appear somewhere before them.

As Stephen mentioned, there does seem to be something fishy with your
log config. Probably the directory you've set them at doesn't
exist. You've got them set to go in here:

/var/log/apache2/local_site.com/

That directory won't exist unless you create it. 

Dave


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links