Francis Daly
February 22, 2021 01:18PM
On Mon, Feb 22, 2021 at 02:12:08PM +0000, Grzegorz Cześnik wrote:

Hi there,

> My nginx distribution is from the official nginx repository for Ubuntu 20 Server
>
> Default:
> location / {
> root / usr / share / nginx / html;
> index index.html index.htm;
> }
>
> Therefore, I prefer to change it.

That's fair enough.

You can safely change it to wherever makes sense to you.

One small note, though:

within the config, you will probably be happier if you have the "root"
directive set at "server" level, outside of any "location" block.

And then only override the setting within a "location" block if there
is a good reason to do that.

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: 301
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