Hallo,
ich schicke fhem durch einen apachen, der die Authentifizierung übernimmt und fhem im inet per https anbietet.
Folgendes möchte ich nun umsetzen:
- alle Oberflächen erreichbar unter derselben domain. KEINE separaten subdomains
- alle Oberflächen erreichbar unter demselben port
- Unterscheidung ausschließlich über den pfad
Da ich ein startcom ssl Zertifikat habe, kann und will ich nicht auf subdomains ausweichen. Unterschiedliche Ports halte ich für hässlich. https hat über Port 443 zu laufen.
Mein bisheriges setup bietet mir unter domain.com/fhem, domain.com/fhem-alt/phone und domain.com/fhem-alt/tablet die diversen Oberflächen mit mehr oder minder großen Einschränkungen.
Die Desktop und Phone Oberfläche läuft, abgesehen davon, dass bei mir 99_myUtils.pm falsch angezeigt wird, fehlerfrei.
Bei Tablet wollen die Links aus der Navigation links nicht so wie ich und springen immer auf /fhem.
In meinem Wunschszenario bietet fhem von sich aus die möglichkeit pro Oberfläche den Pfad festzulegen und ist nicht auf '/fhem' hardgecodet.
Alternativ wird die Apachekonfiguration hier mit ProxyHTMLLinks etc optimiert, da sie so eben noch nicht optimal ist.
Ich poste mal meine Konfiguration, vielleicht sieht es der ein oder andere als Anregung und hat noch eine tolle Idee.
ProxyHTMLExtended On
ProxyHTMLLinks a href
ProxyHTMLLinks area href
ProxyHTMLLinks link href
ProxyHTMLLinks img src longdesc usemap
ProxyHTMLLinks object classid codebase data usemap
ProxyHTMLLinks q cite
ProxyHTMLLinks blockquote cite
ProxyHTMLLinks ins cite
ProxyHTMLLinks del cite
ProxyHTMLLinks form action
ProxyHTMLLinks input src usemap
ProxyHTMLLinks head profile
ProxyHTMLLinks base href
ProxyHTMLLinks script src for
ProxyHTMLLinks option value
ProxyHTMLLinks select onchange
ProxyRequests Off
<Proxy *>
Order deny,allow
Deny from all
</Proxy>
<ProxyMatch (server1|server2\.com|localhost|127.0.0.1)>
Order deny,allow
Allow from all
</ProxyMatch>
<Location /fhem>
AuthType Basic
AuthName "User"
AuthBasicProvider external
AuthExternal pwauth
require user user1 user2 user3
ProxyPass http://localhost:8083/fhem
ProxyPassReverse http://localhost:8083/fhem
ProxyPassReverse /fhem
SetOutputFilter proxy-html
RequestHeader unset Accept-Encoding
</Location>
<Location /fhem-alt/phone>
AuthType Basic
AuthName "User"
AuthBasicProvider external
AuthExternal pwauth
require user user1 user2
ProxyPass http://localhost:8084/fhem
ProxyPassReverse http://localhost:8084/fhem
ProxyPassReverse /fhem-alt/phone
SetOutputFilter proxy-html
ProxyHTMLURLMap /fhem /fhem-alt/phone
ProxyHTMLURLMap /fhem-alt/phone /fhem-alt/phone
RequestHeader unset Accept-Encoding
</Location>
<Location /fhem-alt/tab>
AuthType Basic
AuthName "User"
AuthBasicProvider external
AuthExternal pwauth
require user user1 user2
ProxyPass http://localhost:8085/fhem
ProxyPassReverse http://localhost:8085/fhem
ProxyPassReverse /fhem-alt/tab
SetOutputFilter proxy-html
ProxyHTMLURLMap /fhem /fhem-alt/tab
ProxyHTMLURLMap /fhem-alt/tab /fhem-alt/tab
RequestHeader unset Accept-Encoding
</Location>
AddExternalAuth pwauth /usr/sbin/pwauth
SetExternalAuthMethod pwauth pipe