0

I'm trying to serve files from a directory called localhost under my home.

In my server block I specified root /home/user/localhost

If I change nginx user from http to my username it works but I have problems with php-fpm.

I want to own that folder and serve files from there, in my previous configuration it was working fine, now I reinstalled my OS and doesn't work, probably something in newer versions of nginx changed.

Already tried with chmod 755 -R localhost/, nothing... Even with chown -R http:http localhost it goes 403, which however I do not want, I want to own that dir with my username.

I know this can be done and I've done it before without any permission issue.

What am I missing?

vinzdef
  • 101
  • 2
  • Post your configuration, error log content and adequate filesystem structure. Check for SELinux missing policy/context. – Xavier Lucas Mar 03 '15 at 21:31

1 Answers1

0

After further researches what I was missing were 755 permissions on my home/username folder.

Config an other permissions were fine but you'll get 403 if containing folder(s) isn't readable from outside.

vinzdef
  • 101
  • 2