From 9e5d675fa841887876fd8202761f5743ec28a98e Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Fri, 10 Aug 2012 17:17:04 -0700 Subject: [PATCH] Add example nginx config --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 10f2a0b..e6590aa 100644 --- a/README.md +++ b/README.md @@ -4,3 +4,25 @@ Example curl -H "Authorization: Basic geoloqi:api" "http://timezone-api.geoloqi.com/timezone?latitude=45.5118&longitude=-122.6433" +Nginx Config +------------ + + server { + listen 80; + access_log /var/log/nginx/timezone.log main; + error_log /var/log/nginx/timezone.log notice; + root /web/TimezoneDB; + + location / { + try_files $uri /index.php?$query_string; + } + + location ~ \.php { + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + fastcgi_split_path_info ^(.+\.php)(.*)$; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + } + } +