Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server{
- server_name cloud.example.com;
- client_max_body_size 5000M; # This prevents error http 413. Set it to a value bigger than what you think you will need to sync.
- location / {
- proxy_headers_hash_max_size 512;
- proxy_headers_hash_bucket_size 64;
- proxy_set_header Host $host;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- add_header Front-End-Https on;
- add_header Strict-Transport-Security "max-age=15552000; preload";
- proxy_pass "http://localhost:8080"; # Local address of server
- }
- listen 443 ssl;
- ssl_certificate /etc/letsencrypt/live/cloud.example.com/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/cloud.example.com/privkey.pem;
- include /etc/letsencrypt/options-ssl-nginx.conf;
- ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
- }
- server{
- if ($host = cloud.example.com) {
- return 301 https://$host$request_uri;
- }
- listen 80;
- server_name cloud.example.com;
- return 404;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement