Welcome! Log In Create A New Profile

Advanced

Re: Creating the Directory Structure - static content

Francis Daly
February 21, 2021 10:18AM
On Wed, Feb 17, 2021 at 05:05:42PM +0000, Grzegorz Cześnik wrote:

Hi there,

> /var/www/<domain_name>/public_html
> /var/www/html/<domain_name>
> /var/www/<domain_name>
>
> Are there any benefits to using one of these examples? Is it any freedom in what they write about it?

It is "whatever organisation you prefer" -- the nginx application does
not care what that organisation is, so long as it is told what it is,
probably by using the "root" directive.

From a "belt-and-braces" security perspective, I find it good to ensure
that whatever directory is chosen as a "root", *everything* within that
directory is ok for nginx to serve as-is from the filesystem.

That is -- I don't put top-secret-password-file inside that directory and
then hope that no-one asks for it; and I don't put secret-source-code.php
inside that directory and then hope I remember to add config telling
nginx not to serve it directly.

But they are unrelated to what directory structure to use.

If you use a distribution, and that has a preferred layout, use that
unless you have a reason not to.

Cheers,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Creating the Directory Structure - static content

Grzegorz Cześnik February 17, 2021 12:06PM

Re: Creating the Directory Structure - static content

Francis Daly February 21, 2021 10:18AM

RE: Creating the Directory Structure - static content

Grzegorz Cześnik February 22, 2021 09:14AM

Re: Creating the Directory Structure - static content

Francis Daly February 22, 2021 01:18PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 293
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready