X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=.docker%2Fnginx.conf;fp=docker%2Fdevelopment%2Fnginx.conf;h=e8754d9b478f85cbeb033756d2114759f1809d37;hb=9e425954817621711a528bb3bd2972692a2a528a;hp=ac0c6c61ce165976b7572bb96eb8ba90b5f4d2a8;hpb=c648fc34f882ca6a62f5a44d1826bbd2b9852845;p=github%2Fshaarli%2FShaarli.git diff --git a/docker/development/nginx.conf b/.docker/nginx.conf similarity index 85% rename from docker/development/nginx.conf rename to .docker/nginx.conf index ac0c6c61..e8754d9b 100644 --- a/docker/development/nginx.conf +++ b/.docker/nginx.conf @@ -22,14 +22,6 @@ http { access_log /var/log/nginx/shaarli.access.log; error_log /var/log/nginx/shaarli.error.log; - location /phpinfo/ { - # add a PHP info page for convenience - fastcgi_pass unix:/var/run/php5-fpm.sock; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME /var/www/index.php; - include fastcgi_params; - } - location ~ /\. { # deny access to dotfiles access_log off; @@ -56,7 +48,16 @@ http { alias /var/www/shaarli/images/favicon.ico; } + location / { + # Slim - rewrite URLs + try_files $uri /index.php$is_args$args; + } + location ~ (index)\.php$ { + # Slim - split URL path into (script_filename, path_info) + try_files $uri =404; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + # filter and proxy PHP requests to PHP-FPM fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php;