Creating the Directory Structure - static content
Francis Daly
francis at daoine.org
Mon Feb 22 18:17:33 UTC 2021
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 at daoine.org
More information about the nginx
mailing list