From ec3804ceb8083748fd88b75fa24f9d80a5be249c Mon Sep 17 00:00:00 2001 From: jgen Date: Tue, 18 Feb 2014 00:06:58 -0500 Subject: [PATCH] Fix the nginx config. --- tests/setup_test_env.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/tests/setup_test_env.sh b/tests/setup_test_env.sh index 46da8014..efba7c3a 100644 --- a/tests/setup_test_env.sh +++ b/tests/setup_test_env.sh @@ -31,18 +31,26 @@ server { listen 80 default; root $SHIMMIE_ROOT/; - index index.php; location ~ /_?(images|thumbs)/ { default_type image/jpeg; } - + + # For the Nice URLs in Shimmie. + location / { + if (!-e $request_filename) { + rewrite ^(.*)$ /index.php?q=$1 last; + break; + } + } + location ~ \.php($|/) { - fastcgi_pass 127.0.0.1:9000; + fastcgi_pass 127.0.0.1:9000; + include fastcgi_params; + fastcgi_index index.php; + fastcgi_read_timeout 600; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_param PATH_INFO $fastcgi_script_name; - include fastcgi_params; } } " | sudo tee $NGINX_CONF > /dev/null