Answer the question
In order to leave comments, you need to log in
nginx front + apache back. How to configure for different users?
Good time of the day. I'm trying to set up a bunch of apache + nginx to increase the speed of returning statics. However, it doesn't work. For security reasons, each site works under a separate user through suexec, respectively, in each directory, the rights to files belong to different users.
<VirtualHost 172.19.2.88:8080>
SuexecUserGroup "#500" "#500"
ServerName username.ru
DocumentRoot /home/gent/public_html
ErrorLog /var/log/virtualmin/username_error_log
</VirtualHost>
user nginx;
server {
listen 80;
server_name username.ru
location / {
proxy_pass http://username.ru:8080/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
proxy_connect_timeout 90;
}
location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|rar|tgz|gz|js|bzip2|zip|tar|tiff)$ {
root /home/username/public_html;
}
}
[error] 37187#0: *3 open() "/home/username/public_html/style.css" failed (13: Permission denied)
Answer the question
In order to leave comments, you need to log in
And on a directory costs 755 at least? If the start bit is not set on directories (all the way from root to static) - nginx will not be able to access there, even if the file has 644.
And, by the way, why is nginx so ancient? The mainline is 1.9.9 now, and 1.6.7 is missing a lot compared to 1.9 versions...
Thank you, Yuri. Something blurred his eyes, somehow he did not pay attention.
Regarding the version - what is in the repositories. Connected epel, remi and rpmforge (in addition to the standard ones).
UPD : connected the nginx repository, updated to version 1.8.0
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question