I have the following configuration nginx, but it does not correctly handles URL like /index.php/assets/forum-c3a59b22.css
Nginx said: 404 page not found
server {
listen 80;
server_name docs.org.ua;
root /var/www/docs.org.ua;
index index.html index.htm index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
index index.html index.htm index.php;
}
location /api { try_files $uri $uri/ /api.php?$query_string; }
location /admin { try_files $uri $uri/ /admin.php?$query_string; }
location /flarum {
deny all;
return 404;
}
location ~ .php$ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:8080;
}
# location ~ .php$ {
# fastcgi_split_path_info ^(.+.php)(/.+)$;
# fastcgi_pass unix:/var/run/php5-fpm.sock;
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# fastcgi_index index.php;
# include fastcgi_params;
# }
location ~* \.html$ {
expires -1;
}
location ~* \.(css|js|gif|jpe?g|png)$ {
expires 1M;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
location ~ /\.ht {
deny all;
}
gzip on;
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
gzip_types application/atom+xml application/javascript application/json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/svg+xml image/x$ gzip_buffers 16 8k;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
}