From 800aafe82ff467480865e66f9118c7bbae5307b0 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Fri, 4 Jan 2019 03:57:34 -0700 Subject: [PATCH] basic test pages including php --- .../availableSites/testing_nonsecure_php.conf | 30 +++++++++++++++++ .../availableSites/testing_secure_php.conf | 32 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 etc/nginx/availableSites/testing_nonsecure_php.conf create mode 100644 etc/nginx/availableSites/testing_secure_php.conf diff --git a/etc/nginx/availableSites/testing_nonsecure_php.conf b/etc/nginx/availableSites/testing_nonsecure_php.conf new file mode 100644 index 0000000..8b7b0a9 --- /dev/null +++ b/etc/nginx/availableSites/testing_nonsecure_php.conf @@ -0,0 +1,30 @@ +####### +### NGINX server configuration +### Basic HTTP test setup using default NGINX index page +####### + +server { + listen 80; + listen [::]:80; + + # specify server name(s) + include /etc/nginx/snippets/server_names.conf; + + location / { + try_files $uri $uri/ =404; + } + + location /phptest { + try_files $uri $uri/ =404; + } + + # process PHP files + location ~ \.php$ { + try_files $uri =404; + include /etc/nginx/snippets/php.conf; + } + + + # error pages + include /etc/nginx/snippets/error_pages.conf; +} \ No newline at end of file diff --git a/etc/nginx/availableSites/testing_secure_php.conf b/etc/nginx/availableSites/testing_secure_php.conf new file mode 100644 index 0000000..2c5aae6 --- /dev/null +++ b/etc/nginx/availableSites/testing_secure_php.conf @@ -0,0 +1,32 @@ +####### +### NGINX server configuration +### Basic HTTPS test setup using default NGINX index page +####### + +server { + listen 443 ssl http2; + listen [::]:443 ssl http2; + + # specify server name(s) + include /etc/nginx/snippets/server_names.conf; + + # SSL certificates for this server + include /etc/nginx/snippets/ssl/ssl_certs.conf; + + location / { + try_files $uri $uri/ =404; + } + + location /phptest { + try_files $uri $uri/ =404; + } + + # process PHP files + location ~ \.php$ { + try_files $uri =404; + include /etc/nginx/snippets/php.conf; + } + + # error pages + include /etc/nginx/snippets/error_pages.conf; +}