1
제목에서 언급했듯이 CentOS 6.4에서 nginx + uwsgi 설정에서 권한 거부 오류가 발생합니다. 이미 uwsgi를 루트 권한으로 실행 중입니다. 아래는 설정 파일입니다. 이미 mysite_nginx.conf를/etc/nginx/sites-enabled /에 링크 (ln -s)했음을 주목하십시오. 또한 이미/home/user1/location/mysite의 소유자를 nginx 사용자로 변경했습니다.CentOS 6.4 + Nginx + uwsgi + (13 : 권한 거부)
mysite_uwsgi.ini
#mysite_uwsgi.ini file
[uwsgi]
# Django-related settings
# the base directory (full path)
chdir = /home/user1/location/mysite/myapp
# Django wsgi file
module = mysite.wsgi
# the virtualenv (full path)
home = /home/user1/location/mysite
# process-related settings
# master
master = true
# maximum number of worker processes
processes = 4
# the socket (use the full path to be safe
socket = /home/user1/location/mysite/myapp/myapp.sock
# ... with appropriate permissions - may be needed
chmod-socket = 666
chown-socket = nginx:nginx
# clear environment on exit
vacuum = true
# other config options
uid = nginx
gid = nginx
processes = 4
mysite_nginx.conf는
# mysite_nginx.conf
# the upstream component nginx needs to connect to
upstream mysite {
server unix:///home/user1/location/mysite/myapp/myapp.sock; se this first)
}
# configuration of the server
server {
# the port your site will be served on
listen 8082;
# the domain name it will serve for
server_name 192.168.X.X; #
charset utf-8;
# max upload size
client_max_body_size 75M; # adjust to taste
# Django media
location /media {
alias /home/user1/location/mysite/media;
}
location /static {
alias /home/user1/location/mysite/static;
}
이미 유래 여기에 같은 문제와 관련된 답변을 따라하지만 그들 중 누구도 도움이되지 않습니다. 나는 무엇이 부족한가? 잘못하고있는거야?
미리 감사드립니다.
SELinux를 다음 httpd_t 도메인 권한 지침을 확장 : 당신은 옵션 2에 따라 다음 링크에서 솔루션을 찾을 수 있습니까? audit.log? – SuddenHead
의견에 감사드립니다. 실수로 audit.log의 항목을 삭제했지만 확인시 설치/요청과 관련이 없습니다. 내가 그것을 허용하도록 설정해야합니까? – jaysonpryde
[This] (http://stackoverflow.com/a/24830777/961092) 도움이 될 수 있습니다. –