Zde můžete vidět rozdíly mezi vybranou verzí a aktuální verzí dané stránky.
| Následující verze | Předchozí verze | ||
|
banana_pi_m2u:lighttpd:konfigurace_vhostu [2018/02/19 17:43] chytrex vytvořeno |
banana_pi_m2u:lighttpd:konfigurace_vhostu [2019/01/31 03:24] (aktuální) chytrex +gitea.conf |
||
|---|---|---|---|
| Řádek 14: | Řádek 14: | ||
| server.document-root = "/var/www/html" | server.document-root = "/var/www/html" | ||
| - | include "snippets/chytrex.tk-certs.conf" | + | include "snippets/example.com-certs.conf" |
| include "snippets/http-to-https.conf" | include "snippets/http-to-https.conf" | ||
| } | } | ||
| Řádek 32: | Řádek 32: | ||
| index-file.names = ("index.php", "index.html") | index-file.names = ("index.php", "index.html") | ||
| - | include "snippets/chytrex.tk-certs.conf" | + | include "snippets/example.com-certs.conf" |
| include "snippets/http-to-https.conf" | include "snippets/http-to-https.conf" | ||
| Řádek 70: | Řádek 70: | ||
| } | } | ||
| - | include "snippets/chytrex.tk-certs.conf" | + | include "snippets/example.com-certs.conf" |
| include "snippets/http-to-https.conf" | include "snippets/http-to-https.conf" | ||
| } | } | ||
| Řádek 92: | Řádek 92: | ||
| - | include "snippets/chytrex.tk-certs.conf" | + | include "snippets/example.com-certs.conf" |
| include "snippets/http-to-https.conf" | include "snippets/http-to-https.conf" | ||
| } | } | ||
| + | </file> | ||
| + | |||
| + | ===== ruby.conf ===== | ||
| + | |||
| + | <file - ruby.conf> | ||
| + | # Ruby vhost | ||
| + | |||
| + | $HTTP["host"] == "ruby.example.com" { | ||
| + | |||
| + | server.document-root = "/var/www/ruby" | ||
| + | |||
| + | cgi.assign = ( | ||
| + | ".rb" => "/usr/bin/ruby", | ||
| + | ".erb" => "/usr/bin/eruby", | ||
| + | ) | ||
| + | |||
| + | include "snippets/example.com-certs.conf" | ||
| + | include "snippets/http-to-https.conf" | ||
| + | } | ||
| + | </file> | ||
| + | |||
| + | ===== gitea.conf ===== | ||
| + | |||
| + | Toto bylo trošičku složitější kvůli trablím s aliasem, který se gitea rozhodla ignorovat. Není to tak elegantní ale funguje to. Aneb když nešel Mohamed k hoře, šla hora k Mohamedovi. | ||
| + | |||
| + | <file - gitea.conf> | ||
| + | # Gitea vhost | ||
| + | |||
| + | $HTTP["host"] == "git.example.com" { | ||
| + | |||
| + | include "snippets/example.com-certs.conf" | ||
| + | |||
| + | $HTTP["scheme"] == "http" { | ||
| + | # but not the letsencrypt webroot ... | ||
| + | $HTTP["url"] =~ "^/\.well-known" { | ||
| + | alias.url += ( | ||
| + | "/.well-known/" => "/var/www/dehydrated/.well-known/" | ||
| + | ) | ||
| + | } | ||
| + | # Normal redirect to HTTPS while we get HTTP request | ||
| + | $HTTP["url"] !~ "^/\.well-known" { | ||
| + | $HTTP["host"] =~ ".*" { | ||
| + | url.redirect = ( | ||
| + | ".*" => "https://%0$0" | ||
| + | ) | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | # Finally HTTP request, lets proxy it as we need | ||
| + | $HTTP["scheme"] == "https" { | ||
| + | proxy.server = ( | ||
| + | "" => ( | ||
| + | ( | ||
| + | "host" => "127.0.0.1", | ||
| + | "port" => 3000 | ||
| + | ) | ||
| + | ) | ||
| + | ) | ||
| + | } | ||
| + | } | ||
| + | |||
| </file> | </file> | ||