Существует директория /admin/[css/image/js for admin]
По пути
example.com/admin(/) должна отображаться панель управления, но:
example.com/admin - 403 Forbidden
example.com/admin - redirect to
example.com:8092/admin - и ответ 403 Forbidden
Конфиг
upstream examplebackend {
server 127.0.0.1:8092;
}
server {
server_name example.com;
charset utf-8;
default_type text/html;
root /var/www/example;
ssi on;
index index.php;
# to get real user ip
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
location / {
proxy_pass http://examplebackend;
}
location ~* ^.+\.(ico|jpe?g|gif|png|svg|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|xls|pdf|doc|txt|flv|js|css)$ {
ssi off;
expires 1d;
error_page 404 = @process;
}
location @process {
proxy_pass http://examplebackend;
}
}
server {
listen 8092;
charset utf-8;
default_type text/html;
root /var/www/example;
index index.php;
client_max_body_size 80m;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param APP_CONFIG development;
fastcgi_param REMOTE_ADDR $http_x_real_ip;
}
}