Created
April 28, 2011 14:44
-
-
Save jimishjoban/946479 to your computer and use it in GitHub Desktop.
Nginx coupons config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location /coupons/ { | |
alias /home/jjobanputra/code/coupon/upload/; | |
index index.php index.html index.htm; | |
if (-e $request_filename) { | |
expires 30d; | |
break; | |
} | |
rewrite /coupons/(.+)$ /coupons/index.php?q=$1; | |
} | |
location = /coupons { | |
try_files $uri $uri/ @coupons; | |
} | |
location @coupons { | |
include fastcgi_params; | |
fastcgi_pass 127.0.0.1:53217; | |
fastcgi_split_path_info ^(/coupons)(/.*)$; | |
fastcgi_param SCRIPT_FILENAME /home/jjobanputra/code/coupon/upload/index.php; | |
fastcgi_param PATH_INFO $fastcgi_path_info; | |
} | |
location ~ /coupons/?.*\.php$ { | |
if ($fastcgi_script_name ~ /coupons/?(.*)$) { | |
set $valid_fastcgi_script_name /$1; | |
} | |
fastcgi_pass 127.0.0.1:53217; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME /home/jjobanputra/code/coupon/upload/$valid_fastcgi_script_name; | |
include /opt/nginx/conf/fastcgi.conf; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment