Friday 08 November 2013 4:48:17 pm

to be able to download binary files (i.e. *.jpg) from /content/download we had to modify

 location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|swf|flv|eot|ttf|woff|svg|tiff)$ {
        access_log        off;
        expires           30d;


 location ~* ^(?!\/content\/download).+\.(jpg|jpeg|gif|css|png|js|ico|swf|flv|eot|ttf|woff|svg|tiff)$ { 
        access_log        off;
        expires           30d;

It works, but we are not sure it's the best fix.

Friday 28 June 2013 12:13:55 am

Quote from Francesco Ronzon :

Hi Daniel,

with the virtualhost you suggest (and that we are using in several websites) some *.php are exposed, e.g.

do you think is all right? shouldn't we hide such responses?



maybe should we solve it with


location ~ "^/(index|index_rest|index_ajax|index_treemenu)\.php$"

in the first line of


location ~ "^/[^/]*\.php$" {
  set $script "index.php";
  if ( $uri ~ "^/(.*\.php)" ) {
     set $script $1;
  fastcgi_pass   unix:/tmp/php-fpm.sock;
  fastcgi_index  index.php;
  fastcgi_param  SCRIPT_FILENAME $document_root$script;
  include        fastcgi_params;

am I missing something?

Thursday 27 June 2013 11:46:17 pm

and, to enable treemenu, ezjscore and index_rest we just had to add the following

  rewrite "content/treemenu/?$" "/index_treemenu.php" last;
  rewrite "ezjscore/call/?$" "/index_ajax.php" last;
  rewrite "^/api/(.*)$" "/index_rest.php" last;

how does it sound?  it works apparently...

You must be logged in to post messages in this topic!