mirror of https://github.com/xwiki-labs/cryptpad
Merge pull request #1582 from cryptpad/nginx-80-port
Add support for HTTP -> HTTPS (80 -> 443 ports) redirection
This commit is contained in:
commit
c5d9ff10cf
|
@ -8,6 +8,21 @@
|
||||||
# installation (http server by the Nodejs process). If you are using CryptPad
|
# installation (http server by the Nodejs process). If you are using CryptPad
|
||||||
# in production and require professional support please contact sales@cryptpad.fr
|
# in production and require professional support please contact sales@cryptpad.fr
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
server_name your-main-domain.com your-sandbox-domain.com;
|
||||||
|
|
||||||
|
access_log /dev/null;
|
||||||
|
error_log /dev/null emerg;
|
||||||
|
|
||||||
|
# Let's Encrypt webroot
|
||||||
|
include letsencrypt-webroot;
|
||||||
|
|
||||||
|
# Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response.
|
||||||
|
return 301 https://$host$request_uri;
|
||||||
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 443 ssl;
|
listen 443 ssl;
|
||||||
listen [::]:443 ssl;
|
listen [::]:443 ssl;
|
||||||
|
|
|
@ -8,6 +8,21 @@
|
||||||
# installation (http server by the Nodejs process). If you are using CryptPad
|
# installation (http server by the Nodejs process). If you are using CryptPad
|
||||||
# in production and require professional support please contact sales@cryptpad.fr
|
# in production and require professional support please contact sales@cryptpad.fr
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
server_name your-main-domain.com your-sandbox-domain.com;
|
||||||
|
|
||||||
|
access_log /dev/null;
|
||||||
|
error_log /dev/null emerg;
|
||||||
|
|
||||||
|
# Let's Encrypt webroot
|
||||||
|
include letsencrypt-webroot;
|
||||||
|
|
||||||
|
# Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response.
|
||||||
|
return 301 https://$host$request_uri;
|
||||||
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 443 ssl;
|
listen 443 ssl;
|
||||||
listen [::]:443 ssl;
|
listen [::]:443 ssl;
|
||||||
|
|
Loading…
Reference in New Issue