Re: Debian Apache Config Document
On Mon, Dec 06, 2004 at 11:40:41AM +0800, Lian Liming wrote:
> I am a linux user who swich other linux distro to debian linux. I
> find apache configuration on debian seems a little different from other
> distro. So i am looking for document for apache configuration on debian.
What I did is for each virtual host "foo", add a file
/etc/apache2/sites-enabled/foo, with contents like this:
<VirtualHost *>
ServerName foo.net
ServerAlias www.foo.net foo
DocumentRoot /var/www/foo
ScriptAlias /cgi-bin/ /var/www/foo/cgi-bin/
ErrorLog /var/log/apache2/foo/error.log
CustomLog /var/log/apache2/foo/access.log combined
</VirtualHost>
also:
mkdir /var/log/apache2/foo /var/www/foo
and put documents for the "foo.net" virtual host in /var/www/foo
Put these lines in /etc/apache2/apache2.conf
before the Include ... sites-enabled at the end:
ServerName foo.net
ServerAdmin root@foo.net
ServerSignature On
LogLevel warn
NameVirtualHost *
hopefully this is some help to you.
good chance for me to find out whether I did something dumb or not, too :)
If you prefer, you can also put your vhost conf files in
/etc/apache2/sites-available, and symlink them to /etc/apache2/sites-enabled,
otherwise just move them from one to the other if you want to enable / disable
them.
Sam
Reply to: