Świeżo skonfigurowałem serwer nginx z php-fpm .
Mam problem z wyserwowaniem grafiki dla nowego vhosta .
Tak wygląda konfiguracja vhosta
server {
server_name apollo.kisiek.net www.apollo.kisiek.net;
root "/home/apollo/public_html";
index index.php;
client_max_body_size 10m;
access_log /home/apollo/_logs/access.log;
error_log /home/apollo/_logs/error.log;
if ($http_user_agent ~* (Baiduspider|webalta|nikto|wkito|pikto|scan|acunetix|morfeus|webcollage|youdao) ) {
return 401;
}
if ($http_user_agent ~* (HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner) ) {
return 401;
}
location / {
try_files $uri $uri/ /index.php;
}
location ~ "^(.+\.php)($|/)" {
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SERVER_NAME $host;
if ($uri !~ "^/uploads/") {
fastcgi_pass unix:/var/run/apollo_fpm.sock;
}
include fastcgi_params;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
access_log off;
}
location ~* \.(html|htm)$ {
expires 30m;
}
location ~* /\.(ht|git|svn) {
deny all;
}
}
A taki mam error log
2013/12/08 10:27:31 [error] 23517#0: *245 open() "/home/apollo/public_html/drupal/themes/seven/reset.css" failed (13: Permission denied), client: 31.61.136.196, server: apollo.kisiek.net, request: "GET /drupal/themes/seven/reset.css?0 HTTP/1.1", host: "apollo.kisiek.net", referrer: "http://apollo.kisiek.net/drupal/install.php"
2013/12/08 10:27:31 [error] 23517#0: *247 open() "/home/apollo/public_html/drupal/themes/seven/style.css" failed (13: Permission denied), client: 31.61.136.196, server: apollo.kisiek.net, request: "GET /drupal/themes/seven/style.css?0 HTTP/1.1", host: "apollo.kisiek.net", referrer: "http://apollo.kisiek.net/drupal/install.php"
2013/12/08 10:27:31 [error] 23517#0: *248 open() "/home/apollo/public_html/drupal/misc/jquery.js" failed (13: Permission denied), client: 31.61.136.196, server: apollo.kisiek.net, request: "GET /drupal/misc/jquery.js?v=1.4.4 HTTP/1.1", host: "apollo.kisiek.net", referrer: "http://apollo.kisiek.net/drupal/install.php"
2013/12/08 10:27:31 [error] 23517#0: *249 open() "/home/apollo/public_html/drupal/misc/jquery.once.js" failed (13: Permission denied), client: 31.61.136.196, server: apollo.kisiek.net, request: "GET /drupal/misc/jquery.once.js?v=1.2 HTTP/1.1", host: "apollo.kisiek.net", referrer: "http://apollo.kisiek.net/drupal/install.php"
2013/12/08 10:27:31 [error] 23517#0: *251 open() "/home/apollo/public_html/drupal/misc/drupal.js" failed (13: Permission denied), client: 31.61.136.196, server: apollo.kisiek.net, request: "GET /drupal/misc/drupal.js?0 HTTP/1.1", host: "apollo.kisiek.net", referrer: "http://apollo.kisiek.net/drupal/install.php"
2013/12/08 10:27:31 [error] 23517#0: *250 open() "/home/apollo/public_html/drupal/themes/seven/logo.png" failed (13: Permission denied), client: 31.61.136.196, server: apollo.kisiek.net, request: "GET /drupal/themes/seven/logo.png HTTP/1.1", host: "apollo.kisiek.net", referrer: "http://apollo.kisiek.net/drupal/install.php"
Ogólnie wszystko jest ustalone aby działało pod prawami usera .
W jaki sposób bym nie manewrował vhostem cały czas mam problem .
Jednak z phpmyadmin ( z paczki ) nie ma problemu z obrazkami ( działa na ogólnym sockecie)
Jakieś porady co może być z tym nie tak ?
Dodam że user apollo ma dostęp do wszystkich tych plików.