aboutsummaryrefslogtreecommitdiff
path: root/files/usr/local/etc/nginx
diff options
context:
space:
mode:
Diffstat (limited to 'files/usr/local/etc/nginx')
-rw-r--r--files/usr/local/etc/nginx/vhosts.conf.invidious_server22
-rw-r--r--files/usr/local/etc/nginx/vhosts.conf.pkg_repository7
2 files changed, 28 insertions, 1 deletions
diff --git a/files/usr/local/etc/nginx/vhosts.conf.invidious_server b/files/usr/local/etc/nginx/vhosts.conf.invidious_server
new file mode 100644
index 0000000..35947dc
--- /dev/null
+++ b/files/usr/local/etc/nginx/vhosts.conf.invidious_server
@@ -0,0 +1,22 @@
+server {
+ listen 443 ssl default_server;
+ listen [::]:443 ssl default_server;
+ http2 on;
+
+ ssl_certificate ${invidious_https_cert};
+ ssl_certificate_key ${invidious_https_key};
+
+ add_header Strict-Transport-Security "max-age=63072000" always;
+
+ location / {
+ proxy_http_version 1.1;
+ proxy_set_header Connection "";
+
+ 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;
+
+ proxy_pass http://127.0.0.1:${invidious_port};
+ }
+}
diff --git a/files/usr/local/etc/nginx/vhosts.conf.pkg_repository b/files/usr/local/etc/nginx/vhosts.conf.pkg_repository
index 8177626..73c5754 100644
--- a/files/usr/local/etc/nginx/vhosts.conf.pkg_repository
+++ b/files/usr/local/etc/nginx/vhosts.conf.pkg_repository
@@ -1,9 +1,14 @@
server {
listen 0.0.0.0:80 default_server;
- listen [::]:80 default_server;
+ listen [::]:80 default_server;
+ listen 443 ssl default_server;
+ listen [::]:443 ssl default_server;
server_name ${fqdn};
root ${poudriere_data_dir}/data/packages;
+ ssl_certificate ${poudriere_https_cert};
+ ssl_certificate_key ${poudriere_https_key};
+
include mime.types;
types {
text/plain log;