mirror of
https://github.com/gilbN/theme.park.git
synced 2024-11-25 04:22:34 +01:00
Added apache example. Added link to lsio rp blog post.
parent
dd940174a3
commit
125fa8deea
39
Setup.md
39
Setup.md
@ -4,8 +4,11 @@
|
||||
|
||||
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.
|
||||
|
||||
Add this to your reverse proxy:
|
||||
**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
|
||||
@ -14,9 +17,11 @@ sub_filter
|
||||
</head>';
|
||||
sub_filter_once on;
|
||||
```
|
||||
Where `CUSTOM_CSS` is the name of the theme. e.g. `nzbget-plex.css`
|
||||
**Where `CUSTOM_CSS.css` is the name of the theme you want!**
|
||||
|
||||
Here is a complete example:
|
||||
<https://github.com/gilbN/theme.park/tree/master/CSS/themes>
|
||||
|
||||
**Here is a complete example: **
|
||||
|
||||
```nginx
|
||||
# REDIRECT HTTP TRAFFIC TO https://[domain.com]
|
||||
@ -35,12 +40,28 @@ server {
|
||||
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;
|
||||
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>
|
||||
```
|
Loading…
Reference in New Issue
Block a user