Changes for page How to setup an Nginx reverse proxy and also provide a global X.509 certificate for it
Last modified by Alexandru Pentilescu on 2023/06/25 18:53
From version 9.1
edited by Alexandru Pentilescu
on 2022/06/11 22:42
on 2022/06/11 22:42
Change comment:
There is no comment for this version
To version 8.1
edited by Alexandru Pentilescu
on 2022/06/11 22:40
on 2022/06/11 22:40
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -222,8 +222,7 @@ 222 222 Finally, let's see how we can configure an X509 certificate globally! 223 223 224 224 225 -= Configuring a global X.509 certificate = 226 - 225 += Configuring a global X.509 certificate= 227 227 This is the easiest part of this article. Whenever you wish to encrypt a request to a specific server block in Nginx, just add the "include /etc/nginx/snippets/ssl.conf" directive in its server block and you're pretty much done. 228 228 Now, what should this ssl.conf snippets file contain? Easy: 229 229 ... ... @@ -239,8 +239,7 @@ 239 239 As such, please change these file paths to the 3 files that you will be using from your respective CA. If in doubt, always ask for professional help from a sysadmin! 240 240 241 241 242 -= Testing our setup and deploying = 243 - 241 += Testing our setup and deploying/= 244 244 We're almost done! For completeness' sake, here's my gitea.conf Nginx configuration file as well, so that you have a base to start out with: 245 245 246 246 {{code language="nginx"}} ... ... @@ -279,6 +279,4 @@ 279 279 sudo systemctl enable nginx 280 280 {{/code}} 281 281 282 -Also you might have to open firewall ports 80 and 443 to allow Nginx to listen to these. This is specific to your distro so please do that manually. On my end, I don't remember having to do that. I think just installing Nginx did that automatically. Your mileage may vary. 283 - 284 284 That's it! Happy coding!