1
0
mirror of https://github.com/gilbN/theme.park.git synced 2024-11-21 18:42:32 +01:00

Updated Home (markdown)

GilbN 2019-06-25 21:54:42 +02:00
parent 125fa8deea
commit 64889e1ff4

68
Home.md

@ -1 +1,67 @@
Welcome to the theme.park wiki!
## Setup
### Subfilter
As most of these apps doesn't have support for custom CSS you can get around that by using [subfilter](http://nginx.org/en/docs/http/ngx_http_sub_module.html) in Nginx.
**If you don't know how to reverse proxy an application, please read this first. It's a really great article and will help you understand all the pieces!**
<https://blog.linuxserver.io/2019/04/25/letsencrypt-nginx-starter-guide/>
**Add this to your reverse proxy:**
```nginx
proxy_set_header Accept-Encoding "";
sub_filter
'</head>'
'<link rel="stylesheet" type="text/css" href="https://gilbn.github.io/theme.park/CSS/themes/CUSTOM_CSS.css">
</head>';
sub_filter_once on;
```
**Where `CUSTOM_CSS.css` is the name of the theme you want!**
<https://github.com/gilbN/theme.park/tree/master/CSS/themes>
**Here is a complete example: **
```nginx
# REDIRECT HTTP TRAFFIC TO https://[domain.com]
server {
listen 80;
server_name plpp.domain.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name plpp.domain.com;
#SSL settings
include /config/nginx/ssl.conf
location / {
proxy_pass http://192.168.1.2:8701;
include /config/nginx/proxy.conf;
proxy_set_header Accept-Encoding "";
sub_filter
'</head>'
'<link rel="stylesheet" type="text/css" href="https://gilbn.github.io/theme.park/CSS/themes/plpporg.css">
</head>';
sub_filter_once on;
}
}
```
**For Apache try this: (UNTESTED)**
```apache
AddOutputFilterByType SUBSTITUTE text/html
Substitute 's|</head> '<link rel="stylesheet" type="text/css" href="https://gilbn.github.io/theme.park/CSS/themes/CUSTOM_CSS.css">
</head>';|'
```
**Like so**
```apache
<Location /sonarr>
ProxyPass http://localhost:8989/sonarr
ProxyPassReverse http://localhost:8989/sonarr
AddOutputFilterByType SUBSTITUTE text/html
Substitute 's|</head> '<link rel="stylesheet" type="text/css" href="https://gilbn.github.io/theme.park/CSS/themes/orgarr.css">
</head>';|'
</Location>
```