Browse Source

new file: examples.of.what.worked.for.me/etc/nginx/sites-available/default

thenoob 1 year ago
parent
commit
213c8a719f
1 changed files with 32 additions and 0 deletions
  1. 32
    0
      examples.of.what.worked.for.me/etc/nginx/sites-available/default

+ 32
- 0
examples.of.what.worked.for.me/etc/nginx/sites-available/default View File

@@ -0,0 +1,32 @@
1
+server {
2
+ root /var/www;
3
+ index index.php index.html index.htm;
4
+ server_name put.your.domain.here;
5
+ location / {
6
+ try_files $uri $uri/ =404;}
7
+ location ~ \.php$ {
8
+ include snippets/fastcgi-php.conf;
9
+ fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;}
10
+ location ~ /\.ht {
11
+ deny all;}
12
+    listen [::]:443 ssl ipv6only=on; # managed by Certbot
13
+    listen 443 ssl; # managed by Certbot
14
+    ssl_certificate /etc/letsencrypt/live/put.your.domain.here/fullchain.pem; # managed by Certbot
15
+    ssl_certificate_key /etc/letsencrypt/live/put.your.domain.here/privkey.pem; # managed by Certbot
16
+    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
17
+    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
18
+
19
+}
20
+server {
21
+    if ($host =  put.your.domain.here) {
22
+        return 301 https://$host$request_uri;
23
+    } # managed by Certbot
24
+
25
+
26
+ listen 80 default_server;
27
+ listen [::]:80 default_server;
28
+ server_name  put.your.domain.here;
29
+    return 404; # managed by Certbot
30
+
31
+
32
+}

Loading…
Cancel
Save