Aber ich bekomme es nicht ans Laufen. Es handelt sich um eine Webserver mit verschiedenen virtuellen Hosts. Netdata lokal funktioniert ( lynx http://localhost:19999 ). Nun würde ich gerne die netdata Stats über eine Apache website mit Passwortfrage ( geht über die .htaccess ) einrichten. ICh bin nach der Anleitung "virtuelle hosts" vorgegangen und habe eine Datei ( /etc/apache2/sites-available/netdata.conf ) mit folgenden Inhalt erstellt :
Code: Alles auswählen
<VirtualHost *:80>
RewriteEngine On
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Require all granted
</Proxy>
# Local Netdata server accessed with '/netdata/', at localhost:19999
ProxyPass "/netdata/" "http://localhost:19999/" connectiontimeout=5 timeout=30 keepalive=on
ProxyPassReverse "/netdata/" "http://localhost:19999/"
# if the user did not give the trailing /, add it
# for HTTP (if the virtualhost is HTTP, use this)
RewriteRule ^/netdata$ http://%{HTTP_HOST}/netdata/ [L,R=301]
# for HTTPS (if the virtualhost is HTTPS, use this)
#RewriteRule ^/netdata$ https://%{HTTP_HOST}/netdata/ [L,R=301]
# rest of virtual host config here
</VirtualHost>
Code: Alles auswählen
# phpMyAdmin default Apache configuration
Alias /phpmyadmin /usr/share/phpmyadmin
<Directory /usr/share/phpmyadmin>
Options SymLinksIfOwnerMatch
DirectoryIndex index.php
# limit libapache2-mod-php to files and directories necessary by pma
<IfModule mod_php7.c>
php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
php_admin_value open_basedir /usr/share/phpmyadmin/:/usr/share/doc/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/:/usr/share/javascript/
</IfModule>
</Directory>
# Disallow web access to directories that don't need it
<Directory /usr/share/phpmyadmin/templates>
Require all denied
</Directory>
<Directory /usr/share/phpmyadmin/libraries>
Require all denied
</Directory>
Im Apache DCROOT (/var/www/html) ist eine einfache Verlinkung auf die Haupseite : index.php -> ../www.oss_lifestyle/index.php
Es soll lediglich nur die Lokale URL http://localhost:19999 auf die URL https://my.domain/netdata umgeleitet werden. Was mache ich falsch ?
Edit : Es scheint als würde netdata nicht mit https laufen, da https://localhost:19999 nicht aufgerufen werden kann.
Gibt es eine Möglichkeit die Adresse http://localhost:19999 auf htps://my.domain/netdata zu mappen ?
Edit 2 : Ein Passwortschutz ist wohl über netdata selbst nicht möglich, mit dem apache bekomme ich es nicht hin über ein Webverzeichnis/virtuellen Host mit SSL und .htaccess Passwortschutz.
Zugriff direkt aufs netdata Interface ist wie folgt möglich :
In der /etc/netdata/netdata.conf muss für den Webzugriff bzw. Zugriff von anderen Rechnern als localhost die [WEB] Sektion mit der Client IP erstellt werden :
Code: Alles auswählen
[web]
bind to = clientIP:19999 localhost:19999