daily pastebin goal
35%
SHARE
TWEET

nginx conf gelp

a guest Mar 21st, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # redirect all traffic to https
  2. server {
  3.     listen 80 default_server;
  4.     listen [::]:80 default_server;
  5.     server_name _;
  6.     return 301 https://$host$request_uri;
  7. }
  8.  
  9. #redirect main domain traffic to www subdomain
  10. server {
  11.     listen 443 ssl http2 default_server;
  12.     listen [::]:443 ssl http2 default_server;
  13.     server_name example.duckdns.org;
  14.     #return 301 https://www.example.duckdns.org$request_uri;
  15.    
  16.     include /config/nginx/ssl.conf;
  17.  
  18.     #location /.well-known/matrix/server {
  19.     #return 301 www.example.duckdns.org/.well-known/matrix/server;
  20.     #}
  21.  
  22.     #location / {
  23.     #return 301 www.example.duckdns.org;
  24.     #}
  25. }
  26.  
  27. # main server block
  28. server {
  29.     listen 443 ssl http2;
  30.     listen [::]:443 ssl http2;
  31.  
  32.     root /config/www;
  33.     index index.html index.htm index.php;
  34.  
  35.     server_name www.example.duckdns.org;
  36.  
  37.     include /config/nginx/ssl.conf;
  38.  
  39.     client_max_body_size 0;
  40.  
  41. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top