Nginx 13:Permision Denied


Status
Not open for further replies.

heru nugroho

Beginner 2.0
Siang Master,
Langsung aja ke error log nginx saya :D

Code:
2014/12/01 13:54:31 [error] 3594#0: *1 open() "/home/heru/pub_html/index.php" failed (13: Permission denied), client: 10.10.6.142, server: nheru.me, request: "GET /index.php HTTP/1.1", host: "nheru.me"

/etc/nginx/nginx.conf
Code:
user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    include /etc/nginx/conf.d/*.conf;
}

/etc/nginx/conf.d/nheru.me.conf
Code:
server {
    listen       80;
    server_name  nheru.me;

    #charset koi8-r;
    access_log  /var/log/nginx/log/heru.me.access.log  main;
    error_log   /var/log/nginx/log/heru.me.error.log;
    location / {
        root   /home/heru/pub_html;
        index  index.html index.htm;
    }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /home/heru/pub_html;
    }
    location ~ \.php$ {
        root           html;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  /home/heru/pub_html$fastcgi_script_name;
        include        fastcgi_params;
    }
}

namei -l /home/heru/pub_html/index.html
Code:
f: /home/heru/pub_html/index.html
dr-xr-xr-x root root /
drwxr-xr-x root root home
drwxr-xr-x heru heru heru
drwxr-xr-x heru heru pub_html
-rw-r--r-- heru heru index.html

Mohon bantuannya :D
 

mustafaramadhan

Hosting Guru
Sesuaikan ownership dan atau permissions dari directory terkait.
 

linboxs

New Member
Dari error message nya sih dah kelihatan kalau ada request ke file /home/heru/pub_html/index.php :)
Coba di cek lagi apakah file tersebut ada dan bagaimana ownershipnya :)
 

heru nugroho

Beginner 2.0
Dari error message nya sih dah kelihatan kalau ada request ke file /home/heru/pub_html/index.php :)
Coba di cek lagi apakah file tersebut ada dan bagaimana ownershipnya :)
Ownershipnya gini mas
Code:
f: /home/heru/pub_html/index.html
dr-xr-xr-x root root /
drwxr-xr-x root root home
drwxr-xr-x heru heru heru
drwxr-xr-x heru heru pub_html
-rw-r--r-- heru heru index.html
 

mustafaramadhan

Hosting Guru
Yang jadi masalah adalah '/home/heru/pub_html/index.php' sedangkan dari list file tersebut tidak terlihat. Ini masalahnya.
 

mustafaramadhan

Hosting Guru
Kecuali tidak ada masalah lain, ini saya bandingkan dengan directory punya saya (pakai Kloxo-MR):

> namei -l /home/anzip/anzi-pacific.com/index.html
Code:
f: /home/anzip/anzi-pacific.com/index.html
drwxr-xr-x apache apache /
drwxr-xr-x root root home
drwxr-x--x anzip apache anzip
drwxr-xr-x anzip apache anzi-pacific.com
-rw-r--r-- anzip anzip index.html
 
Status
Not open for further replies.

Top