| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- # Upstream sites for proxy-ing
- upstream wp {
- server <CHANGE_ME>:8082;
- }
-
- ### Redirect regular traffic to SSL
- server {
- listen 80 default_server;
- listen [::]:80 default_server;
-
- server_name <CHANGE_ME> www.<CHANGE_ME>;
-
- # return 301 https://$host$request_uri;
-
- # root /opt/app/public/;
- # WP Test
- root /var/www/html;
- index index.html index.htm index.php index.nginx-debian.html;
-
- location / {
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
-
- proxy_pass http://wp;
- proxy_redirect off;
- }
- }
-
- ### SSL Stuff
- server {
- listen 443 ssl http2;
- listen [::]:443 ssl http2;
-
- server_name <CHANGE_ME> www.<CHANGE_ME>;
-
- include snippets/letsencrypt.conf;
- include snippets/ssl-params.conf;
-
- root /var/www/html;
- index index.html index.htm index.php index.nginx-debian.html;
-
- # location / {
- # try_files $uri $uri/ /index.php;
- # }
-
- location / {
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header Accept-Encoding "";
- proxy_set_header Proxy "";
-
- proxy_pass http://wp;
- proxy_redirect off;
- }
-
- location ~/\.ht {
- deny all;
- }
- }
|