From a73b93840a71b39739563f116ca58040c90720b8 Mon Sep 17 00:00:00 2001 From: Nathan Lasseter Date: Tue, 5 Mar 2013 22:57:24 +0000 Subject: All new instructions, licence, readme, sample files --- nginx.sample | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 nginx.sample (limited to 'nginx.sample') diff --git a/nginx.sample b/nginx.sample new file mode 100644 index 0000000..ad5fa4f --- /dev/null +++ b/nginx.sample @@ -0,0 +1,26 @@ +server { + listen 80; + server_name example.co.uk; + + index index.php index.html index.htm; + autoindex on; + + root /var/www; + + rewrite \/post\/(.*)$ /viewpost.php?post=$1; + location /dopost.php { + auth_basic "Login to post"; + auth_basic_user_file /var/www/.htpasswd; + include /etc/nginx/fastcgi_params; + fastcgi_pass unix:/var/run/php-fastcgi/php-fastcgi.socket; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME /var/www/dopost.php; + } + + location ~ \.php$ { + include /etc/nginx/fastcgi_params; + fastcgi_pass unix:/var/run/php-fastcgi/php-fastcgi.socket; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME /var/www/$fastcgi_script_name; + } +} -- cgit v1.2.3