Welcome! Log In Create A New Profile

Advanced

new to web

Matthew Ngaha
November 29, 2013 12:00PM
Hi guys i'm very new to web dev, and getting started with nginx i just
wanted to ask a few things.

Location blocks. Is the idea here to have as many location blocks as
you have web pages? if a location has many files in it will nginx
search if the requested file is in that location? i put a file
"flood.jpg" inside my default root location (below) but i get
permission denied when trying to access the file on my web browser. I
do however see my nginx index homepage. To see "flood.jpg" do i need
to add something to this block?

location / {
root html;
index index.html index.htm;
}

i also made a file in my root html folder: html/test/filename.html

This is also permission denied, but i want to ask. Is it ok accessing
files like this or would it be better to make a specific location
block for them, like:

location /test/filename.html
or
location /test/

should it be INSIDE the root location block: location /
or should it be a separate block?

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

new to web

Matthew Ngaha November 29, 2013 12:00PM

Re: new to web

Francis Daly November 29, 2013 06:30PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 157
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