Since a while nginx 1.4.4 refuses to deliver webpages and always returns “403 Forbidden”. I can’t remember having changed anything before this problem occured, nevertheless I deleted /etc/nginx an reinstalled it. It’s still not working.
You could at least start telling us which version of openSUSE you use.
I can not say anything about nginx (not using it, in fact never heard of it until now, most people will use Apacha I guess), but while you talk about checking permission, it is not only the ownership/permission of the file /srv/www/htdocs/index.html, but also those of /srv, /srv/www and /srv/www/htdocs that matter. You do not show them, thus I do not know if you checked if the user nginx has serach/read access through the directories in that path.
nginx is all the rage now.
Very light on memory requirements, very powerful.
And, most of all very versatile. Out of the box, is generally easy to re-configure either as a regular webserver or as a proxy (in particular reverse proxy). Is why it has become a favorite for Production use and NetAdmins.
In a default openSUSE install nginx runs in the context of root, so your web root shouldn’t be owned by nginx/nginx, it should be owned by root/root. On the other hand of course, if you modified accordingly it certainly seems much better to run as a lower privileged User, but if/whenever you update/upgrade YMMV depending on how you modified.
While focusing on the permissions of htdocs I completely forgot about the parent folders. I guess there was a x permission missing because after a chmod ug+rw on /srv and /srv/www the problem is gone.
Thanks for all your effort.
I found that there shouldn’t have been a permissions issue regardless whether the files were owned by root or nginx, and it also didn’t matter if the file permissions are altered to permit “everyone” (0777). I was able to serve pages successfully in every configuration.
I also tested with the firewall up or down (blocking) and I got a different error message.
So, if the error message as stated is correct, then the problem is somewhere else…
That leads me to ask where this nginx was installed from… Did it come from the openSUSE repos (as it should) or was it installed from some other source?