From 9992b1ffe6ef5f7621f8f6ec60fa024d10ccf1d5 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Thu, 13 Jun 2013 17:46:23 +0100 Subject: Add sample nginx conf in doc/install - we'll keep configs and trouble shooting doco here, where everything can be plain text, since it's for people who haven't got Red installed yet/properly, and may not be able to read markdown easily. --- doc/install/sample-nginx.conf | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 doc/install/sample-nginx.conf diff --git a/doc/install/sample-nginx.conf b/doc/install/sample-nginx.conf new file mode 100644 index 000000000..e7ce66db0 --- /dev/null +++ b/doc/install/sample-nginx.conf @@ -0,0 +1,28 @@ +# A sample configuration for The Red Matrix on Nginx. One should also take care to block access to dot files, etc, in their standard.conf. + + +server { +listen 80; +listen 443 ssl; +server_name example.com; +ssl_certificate /path/to/ssl.crt; +ssl_certificate_key /path/to/ssl.key; + +root /var/www/example.com; + access_log /var/log/nginx/example.com.log; + include standard.conf; + location ~ \.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_pass php; + fastcgi_read_timeout 300; + } + if (!-e $request_filename){ + rewrite ^(.*)$ /index.php?q=$1 last; + } + location / { + try_files $uri $uri/ /index.php; + } +} + -- cgit v1.2.3 From 047967da990aee62d029a20502981ee8c57bec97 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Thu, 13 Jun 2013 18:47:22 +0100 Subject: Nginx config - add an index in case they don't have a http block --- doc/install/sample-nginx.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/install/sample-nginx.conf b/doc/install/sample-nginx.conf index e7ce66db0..3f33044fb 100644 --- a/doc/install/sample-nginx.conf +++ b/doc/install/sample-nginx.conf @@ -9,6 +9,7 @@ ssl_certificate /path/to/ssl.crt; ssl_certificate_key /path/to/ssl.key; root /var/www/example.com; + index index.php; access_log /var/log/nginx/example.com.log; include standard.conf; location ~ \.php$ { -- cgit v1.2.3