]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - docker/production/nginx.conf
API+Docker: enable nginx URL rewriting
[github/shaarli/Shaarli.git] / docker / production / nginx.conf
index 5ffa02d0a9d570136d4ab7ea8f8bef4107f03cb7..e8754d9b478f85cbeb033756d2114759f1809d37 100644 (file)
@@ -48,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;