Hi Terry,
> pi@raspberrypi:/var/www/html $ ls -ld
> drwxr-xr-x 4 root root 4096 Feb 19 09:19 .
> pi@raspberrypi:/var/www/html $ ls -la
> total 20
> drwxr-xr-x 4 root root 4096 Feb 19 09:19 .
> drwxr-xr-x 3 root root 4096 Aug 10 2016 ..
> drwxr-xr-x 2 root root 4096 Aug 18 2016 Guide
> -rw-r--r-- 1 root root 867 Feb 19 09:19 index.html
> drwxr-xr-x 2 root root 4096 Aug 18 2016 Quiz
They're fine.
> > sudo -i -u nginx
> >
> > (Replace nginx with the actual user name)
>
> The user is root. Is that normal?
No, the user isn't root. The user and group on /var/www/html is
root:root; that's normal. But Jon meant the user that nginx runs as
when processing incoming HTTP requests, e.g. `www-data'. This is done
so an error in nginx, or in code you ask it to run, has limited access
rights when it goes haywire, or is exploited by an attacker.
$ ps o user,uid,pid,ppid,command `pidof nginx`
USER UID PID PPID COMMAND
root 0 3381 1 nginx: master process /usr/sbin/nginx -g daemon
on; master_process on;
www-data 33 3383 3381 nginx: worker process
www-data 33 3384 3381 nginx: worker process
www-data 33 13213 3381 nginx: worker process
$
> > Then make sure you can read one of the files.
The aim was to see if the pleb www-data can read the files that you want
to serve.
> My recollection is that I only changed those names on the Pi (compared
> to the version on my server), to make typing easier,
You are aware of Tab completion in the shell? `cd Aud<Tab>' completes
to Audio_Guide.
> but clearly having the Directory names as Audio_Guide and Kiddies_Quiz
> instead of Guide and Quiz was what was needed. Why would that be?
You earlier wrote:
> The latest pages are working on my website at:
> http://hadrian-way.co.uk/Audio_Guide/audio_guide.html
> and
> http://hadrian-way.co.uk/Kiddies_Quiz/index.html
nginx is taking the path part of the URL, from the `/' after the domain
name to the optional query parameters starting with a `?', and trying to
access that tacked on to /var/www/html. If the URL's path is
Audio_Guide then the directory has to match. This is why I suggested a
simple top-level now.txt as a known thing under /var/www/html. Or am I
misunderstanding the question?
Cheers, Ralph.
--
Next meeting: Bournemouth, Tuesday, 2017-03-07 20:00
Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/
New thread: mailto:[email protected] / CHECK IF YOU'RE REPLYING
Reporting bugs well: http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR