From 0917da6e28b50789a99aaea1cdd477eb1a9841a6 Mon Sep 17 00:00:00 2001 From: RiversideRocks <59586759+RiversideRocks@users.noreply.github.com> Date: Thu, 18 Nov 2021 09:12:36 -0500 Subject: [PATCH] Apache sample config (#168) Apache sample config --- Apache2-reverse-proxy.md | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Apache2-reverse-proxy.md diff --git a/Apache2-reverse-proxy.md b/Apache2-reverse-proxy.md new file mode 100644 index 0000000..3824df9 --- /dev/null +++ b/Apache2-reverse-proxy.md @@ -0,0 +1,47 @@ +--- +title: Apache2-reverse-proxy +description: +published: true +date: 2021-11-17T16:59:09.054Z +tags: +editor: markdown +dateCreated: 2021-11-17T20:40:07.950Z +--- + +This is the barebones SSL and non-SSL configs for Apache 2.2 and up. You will need to use Let's Encrypt to generate a certificate. Replace `your-domain` with your website. Logs are not recorded by default. + +``` + + ServerAdmin webmaster@localhost + ServerAlias your-domain + + ProxyPass / http://0.0.0.0:3000/ + ProxyPassReverse / http://0.0.0.0:3000/ +RemoteIPHeader CF-Connecting-IP + ErrorLog /dev/null + CustomLog /dev/null +RewriteEngine on +RewriteCond %{SERVER_NAME} =your-domain +RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] + + + + ServerAdmin webmaster@localhost + ServerAlias your-domain + + ErrorDocument 503 "Invidious is unavailable at this time." + ProxyPass / http://0.0.0.0:3000/ + ProxyPassReverse / http://0.0.0.0:3000/ + + ErrorLog /dev/null + CustomLog /dev/null + +#RemoteIPHeader CF-Connecting-IP + +Include /etc/letsencrypt/options-ssl-apache.conf +ServerName your-domain +SSLCertificateFile /etc/letsencrypt/live/your-domain/fullchain.pem +SSLCertificateKeyFile /etc/letsencrypt/live/your-domain/privkey.pem + + +```