diff --git a/pastebook.conf b/pastebook.conf new file mode 100644 index 0000000..fabe081 --- /dev/null +++ b/pastebook.conf @@ -0,0 +1,45 @@ +server { + listen 80; + server_name ; + + location / { + return 301 https://$host$request_uri; + } +} + +server { + listen 443 ssl; + server_name ; + + location / { + proxy_buffering off; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Port $server_port; + proxy_pass http://localhost:3000/; + } +} + +server { + listen 80; + server_name api.; + + location / { + return 301 https://$host$request_uri; + } +} + +server { + listen 443 ssl; + server_name api.; + + client_max_body_size 6M; + + location / { + proxy_buffering off; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Port $server_port; + proxy_pass http://localhost:8080/; + } +}