-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Solve problem connecting to the https server
The issue arduino-libraries/WiFi101#310 was not in cause and will be closed. The problem was a nginx ssl config server side.
- Loading branch information
Showing
3 changed files
with
71 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[Unit] | ||
Description=gunicorn daemon | ||
After=network.target | ||
|
||
[Service] | ||
User=gael | ||
Group=www-data | ||
WorkingDirectory=/home/gael/Projets/moisture | ||
|
||
ExecStart=/home/gael/miniconda3/envs/moisture/bin/gunicorn --access-logfile /var/log/gunicorn/access.log --error-logfile /var/log/gunicorn/error.log --workers 2 --bind 192.168.1.21:8000 moisture.wsgi:application | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
################################ | ||
## our HTTP server at port 80 ## | ||
################################ | ||
server { | ||
listen 80 default; | ||
## set up domain name here ## | ||
server_name moisture.nsupdate.info; | ||
access_log off; | ||
error_log off; | ||
##** nginx redirect ALL http requests to https ** ## | ||
return 301 https://$server_name$request_uri; | ||
} | ||
|
||
server { | ||
listen 443 ssl; | ||
|
||
listen [::]:443 ssl; | ||
server_name moisture.nsupdate.info; | ||
|
||
location = /favicon.ico { | ||
access_log off; log_not_found off; | ||
} | ||
|
||
ssl on; | ||
ssl_certificate /etc/letsencrypt/live/myrga.nsupdate.info/fullchain.pem; # managed by Certbot | ||
ssl_certificate_key /etc/letsencrypt/live/myrga.nsupdate.info/privkey.pem; # managed by Certbot | ||
ssl_trusted_certificate /etc/letsencrypt/live/myrga.nsupdate.info/chain.pem; | ||
ssl_dhparam /etc/ssl/certs/dhparam.pem; | ||
ssl_session_cache shared:SSL:1m; | ||
ssl_session_timeout 1440m; | ||
# ssl_buffer_size 8k; | ||
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; | ||
# ssl_ciphers TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:TLS_AES_128_CCM_8_SHA256:TLS_AES_128_CCM_SHA256:ECDHE-ECDSA-AES128-GCM-SH | ||
A256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA | ||
-AES256-GCM-SHA384; | ||
# ssl_prefer_server_ciphers on; | ||
# ssl_stapling on; | ||
# ssl_stapling_verify on; | ||
# ssl_ecdh_curve secp384r1:X25519:prime256v1; | ||
|
||
location /static { | ||
alias /home/gael/Projets/moisture/static; | ||
} | ||
|
||
location / { | ||
include proxy_params; | ||
proxy_pass http://192.168.1.21:8000/ ; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
} | ||
|
||
|
||
} |