Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
blocks:server:nginx [2022-12-13 13:47] admin [NGINX Reverse Proxy] |
blocks:server:nginx [2023-03-16 17:46] (current) admin Moved "redirect all HTTP" to the bottom |
||
---|---|---|---|
Line 50: | Line 50: | ||
Make sure to keep the space after // | Make sure to keep the space after // | ||
- | |||
- | If you want to use HTTPS for all traffic, edit the file at **/ | ||
- | |||
- | < | ||
- | # Redirect ALL http request to https | ||
- | server { | ||
- | listen 80 default_server; | ||
- | server_name _; | ||
- | return 301 https:// | ||
- | } | ||
- | </ | ||
- | |||
- | Save and exit //nano// again. | ||
Make sure you've set good, strong passwords on all your Blocks users. Finally, while still as the //root// user, run the following commands, pressing enter after each. The first of these commands checks your new nginx configuration for errors. Pay close attention to any error messages that may appear. | Make sure you've set good, strong passwords on all your Blocks users. Finally, while still as the //root// user, run the following commands, pressing enter after each. The first of these commands checks your new nginx configuration for errors. Pay close attention to any error messages that may appear. | ||
Line 85: | Line 72: | ||
If you get stuck, and need more details, follow the official //certbot// guide found [[https:// | If you get stuck, and need more details, follow the official //certbot// guide found [[https:// | ||
+ | |||
+ | If you want to use HTTPS for all traffic, edit the file at **/ | ||
+ | |||
+ | < | ||
+ | # Redirect ALL http request to https | ||
+ | server { | ||
+ | listen 80 default_server; | ||
+ | server_name _; | ||
+ | return 301 https:// | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Save and exit //nano// again, then test your configuration and restart nginx: | ||
+ | |||
+ | < | ||
+ | sudo /sbin/nginx -t | ||
+ | sudo systemctl restart nginx | ||
+ | </ | ||
===Using Local Wifi=== | ===Using Local Wifi=== |