-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First stab at implementing nginx HTTPS reverse proxying
- Loading branch information
Showing
6 changed files
with
76 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
|
||
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
|
||
docker pull certbot/dns-ovh && \ | ||
docker run -it --rm --name certbot \ | ||
-v "${BASEDIR}/config/certbot:/etc/letsencrypt" \ | ||
certbot/dns-ovh certonly \ | ||
--agree-tos \ | ||
--email [email protected] \ | ||
--no-eff-email \ | ||
--dns-ovh \ | ||
--dns-ovh-credentials /etc/letsencrypt/ovh-credentials.ini \ | ||
--dns-ovh-propagation-seconds 120 \ | ||
-d tv.twan.ovh |
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,8 @@ | ||
#!/bin/sh | ||
|
||
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
|
||
docker pull certbot/dns-ovh && \ | ||
docker run -it --rm --name certbot \ | ||
-v "${BASEDIR}/config/certbot:/etc/letsencrypt" \ | ||
certbot/dns-ovh renew |
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,5 @@ | ||
# Ignore everything in this directory | ||
* | ||
# Except these | ||
!.gitignore | ||
!ovh-credentials.ini.example |
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,7 @@ | ||
# OVH API credentials for Certbot | ||
# Documentation here : https://certbot-dns-ovh.readthedocs.io/ | ||
|
||
dns_ovh_endpoint = ovh-eu | ||
dns_ovh_application_key = MDAwMDAwMDAwMDAw | ||
dns_ovh_application_secret = MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAw | ||
dns_ovh_consumer_key = MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAw |
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,33 @@ | ||
worker_processes 1; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
include /etc/nginx/mime.types; | ||
gzip on; | ||
gzip_http_version 1.1; | ||
gzip_comp_level 2; | ||
gzip_types text/plain text/html text/css | ||
application/x-javascript text/xml | ||
application/xml application/xml+rss | ||
text/javascript; | ||
|
||
server { | ||
listen 443 default_server ssl; | ||
|
||
server_name tv.twan.ovh; | ||
|
||
ssl_certificate /etc/letsencrypt/live/tv.twan.ovh/cert.pem; | ||
ssl_certificate_key /etc/letsencrypt/live/tv.twan.ovh/privkey.pem; | ||
|
||
location /sonarr/ { | ||
proxy_pass http://sonarr:8989; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
} | ||
} |
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