Nginx + phpmyadmin = не отдается статика?
Про статику вообще вопрос избитый, решений много. Проблема в том, что у меня не отдается именно из прикрученного phpmyadmin, с самого сайта статика отдается.
конфиг:
server {
listen 80;
root /home/user/www;
index index.php index.html index.htm;
include mime.types;
server_name localhost;
#location / {
# First attempt to serve request as file, then
# as directory, then fall back to index.html
#try_files $uri $uri/ /index.php;
#}
location ~* ^.+\.(htm|html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|js)$ {
root /home/user/www/;
}
location ~* ^.+\.(htm|html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|js)$ {
root /usr/share/phpmyadmin/;
}
location ^~ /phpmyadmin {
root /usr/share/phpmyadmin;
index index.php;
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share$fastcgi_script_name;
}
location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /home/user/www/$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}
права на подкаталоги
root@synclexpro:~# ls -lA /usr/share/phpmyadmin/themes
итого 8
drwxrwxrwx 4 www-data root 4096 Мар 29 19:49 darkblue_orange
drwxrwxrwx 4 www-data root 4096 Мар 29 19:50 original
Т.е. ip_site/print.css отдаст, а ip_site/phpmyadmin/print.css -> «access denied»
P.s.
Знаю, что полечить надо знания) уж как умею пока)
конфиг:
server {
listen 80;
root /home/user/www;
index index.php index.html index.htm;
include mime.types;
server_name localhost;
#location / {
# First attempt to serve request as file, then
# as directory, then fall back to index.html
#try_files $uri $uri/ /index.php;
#}
location ~* ^.+\.(htm|html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|js)$ {
root /home/user/www/;
}
location ~* ^.+\.(htm|html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|js)$ {
root /usr/share/phpmyadmin/;
}
location ^~ /phpmyadmin {
root /usr/share/phpmyadmin;
index index.php;
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share$fastcgi_script_name;
}
location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /home/user/www/$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}
права на подкаталоги
root@synclexpro:~# ls -lA /usr/share/phpmyadmin/themes
итого 8
drwxrwxrwx 4 www-data root 4096 Мар 29 19:49 darkblue_orange
drwxrwxrwx 4 www-data root 4096 Мар 29 19:50 original
Т.е. ip_site/print.css отдаст, а ip_site/phpmyadmin/print.css -> «access denied»
P.s.
Знаю, что полечить надо знания) уж как умею пока)
Похожие публикации
Несуществующие поддомены домена
Не открывается страница без расширения файла. Почему то...
Проект не доступен. Ошибка хостинга или провайдера интернета.
Вопрос по доступам.
Plesk 9.5.2
Нет комментариев