Browse code

add sample nginx configuration

devnewton authored on 27/08/2017 10:42:01 • GitHub committed on 27/08/2017 10:42:01
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,36 @@
1
+server {
2
+        listen 80;
3
+        listen [::]:80;
4
+        location '/.well-known/acme-challenge/' {
5
+                default_type "text/plain";
6
+                root /srv/letsencrypt/taab;
7
+        }
8
+        location / {
9
+                return 301 https://$server_name$request_uri;
10
+        }
11
+        server_name taab.bci.im;
12
+}
13
+
14
+server {
15
+        listen 443 ssl;
16
+        listen [::]:443 ssl;
17
+        server_name taab.bci.im;
18
+        charset utf-8;
19
+        root /srv/taab;
20
+        index index.php;
21
+        location ^~ /data {
22
+                deny all;
23
+        }
24
+        location ~ \.php$ {
25
+                try_files $uri =404;
26
+                fastcgi_pass unix:/run/php/php7.0-fpm.sock;
27
+                fastcgi_index index.php;
28
+                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
29
+                include fastcgi_params;
30
+        }
31
+        ssl_certificate /etc/letsencrypt/live/taab.bci.im/fullchain.pem;
32
+        ssl_certificate_key /etc/letsencrypt/live/taab.bci.im/privkey.pem;
33
+        ssl_prefer_server_ciphers on;
34
+        client_max_body_size 100m;
35
+        client_body_timeout 600s;
36
+}