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

Re: Apache default directories



On 15/03/14 12:20, Peter Michaux wrote:
> Hi,
> 
> The default virtual host when Apache is installed on Debian has
> document root /var/www and a cgi-bin directory /usr/lib/cgi-bin. These
> directories do not make intuitive sense to me. 

That's the problem with intuition (instant understanding). ;)

> If I have static HTML
> pages and some Perl CGI scripts, I would expect they go somewhere
> under /usr/share/. 

root "owns" /usr/share

Would you want your web server running as root?


> What is the rational behind the chosen default
> directories?


/var/www is owned by the webserver and the server group (www-data)
ls -al /var/www

I use 644 for simple webservers where the web root is /var/www - I'm
unsure of the default permission. Hopefully someone will post the
default Debian permissions for /var/www as I don't  have to time to boot
a stock Debian webserver image and check at present.

This may prove useful to you:-
http://httpd.apache.org/docs/2.4/misc/security_tips.html#serverroot

> 
> Thanks,
> Peter
> 
>   # cat /etc/apache2/sites-enabled/000-default
<snipped>

Kind regards


Reply to: