aboutsummaryrefslogtreecommitdiff
path: root/nginx.sample
diff options
context:
space:
mode:
authorNathan Lasseter <nathan@4574.co.uk>2013-03-05 22:57:24 +0000
committerNathan Lasseter <nathan@4574.co.uk>2013-03-05 22:57:24 +0000
commita73b93840a71b39739563f116ca58040c90720b8 (patch)
tree3ab394b999d73cdd2d39d3b4eb73cc050f5a382a /nginx.sample
parentdb38f8ec3c831685e7f9ed5a8a1bcf04f1d6b27f (diff)
All new instructions, licence, readme, sample files
Diffstat (limited to 'nginx.sample')
-rw-r--r--nginx.sample26
1 files changed, 26 insertions, 0 deletions
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;
+ }
+}