Web Server auf dem Raspberry Apache2

706 views
Skip to first unread message

Günther Wrana

unread,
May 28, 2019, 2:16:15 PM5/28/19
to weewx-user
Hallo habe alles nach Anleitung gemacht nur das funktioniert nicht warum?


pi@raspberrypi:~ $ sudo apt-get install apache2
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
apache2 ist schon die neueste Version (2.4.25-3+deb9u7).
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 70 nicht aktualisiert.
pi@raspberrypi:~ $ sudo cp util/apache/conf.d/weewx.conf /etc/apache2/conf.d
cp: der Aufruf von stat für 'util/apache/conf.d/weewx.conf' ist nicht möglich: Datei oder Verzeichnis nicht gefunden


Was habe ich falsch eingegeben oder was muss ich noch tun? 

vince

unread,
May 28, 2019, 2:30:08 PM5/28/19
to weewx-user
On Tuesday, May 28, 2019 at 11:16:15 AM UTC-7, Günther Wrana wrote:
Was habe ich falsch eingegeben oder was muss ich noch tun? 

You have extra space characters in your command.

Try:
            sudo cp util/apache/conf.d/weewx.conf /etc/apache2/conf.d


gjr80

unread,
May 28, 2019, 11:35:47 PM5/28/19
to weewx-user
I suspect the additional spaces are artefacts of translating the original text in-page. The original text when viewed in a browser or via the email notification doesn't show spaces (well not for me).

In any case I suspect the issue is one of paths. The cp command was issued from the /home/pi directory and command as issued will try to copy /home/pi/util/apache/conf.d/weewx.conf which of course does not exist. You will find util/apache/conf.d/weewx.conf is in /home/weewx if installed via setup.py. It's a bit more complicated if you installed via deb or rpm, there is no util directory but you will find the contents of the util directory in /etc/weewx. So you can either change directories or include a full path in the cp command as follows:

$ sudo cp /home/weewx/util/apache/conf.d/weewx.conf /etc/apache2/conf.d

for a setup.py install or

$ sudo cp /etc/weewx/apache/conf.d/weewx.conf /etc/apache2/conf.d

for a deb/rpm install.

Gary

Günther Wrana

unread,
May 29, 2019, 7:42:47 AM5/29/19
to weewx-user
Danke für die Hilfe ich habe es schon installiert.
Wieder einmal mein Fehler ich war nicht im Richtigen Pfad.

Grüße Günther

Günther Wrana

unread,
May 29, 2019, 11:48:21 AM5/29/19
to weewx-user
Jetzt noch eine Frage was stimmt nun nicht.

Ich habe am Raspberry wo ich nun alles Installiert und kopiert und neu gestartet habe,
im Chromium http://localhost/weewx eingegeben.
Nun schreibt der Browser aber das.


Not Found

The requested URL /weewx was not found on this server.


Apache/2.4.25 (Raspbian) Server at localhost Port 80


Wo liegt jetzt mein Fehler?



Patrick Tranchant

unread,
May 29, 2019, 12:36:39 PM5/29/19
to weewx-user
hi
what is the result after this command ? /etc/init.d/apache2 restart
and after http://localhost in a browser ?
Gruß

salinois

Günther Wrana

unread,
May 29, 2019, 2:37:23 PM5/29/19
to weewx-user
Genau das was ich geschrieben habe das einzige was ich noch nicht gemacht habe.
Ist den Raspberry ganz aus und wieder ein zu schalten.

Grüße Günther

Günther Wrana

unread,
Jun 3, 2019, 3:01:17 PM6/3/19
to weewx-user
Hallo dort


/etc/apache2/conf.d 

steht das darin 

Alias /weewx /home/weewx/public_html
<Directory /home/weewx/public_html>
  Options FollowSymlinks
  AllowOverride None
</Directory>

Ist das korrekt? Stimmt das mit den Leerzeichen? Ist die Datei korrekt?
Den es funktioniert immer noch nicht.

Günther Wrana

unread,
Jun 7, 2019, 4:54:17 PM6/7/19
to weewx-user
Ich habe schon heraus gefunden das ich die weewx.conf in den Ordner conf-available kopiern muss.

Nur weiß ich immer noch nicht was ich im Ordner conf-enabled wo eingeben muss das ich meine Seite die im Verzeichniss /home/weewx/puplic_html/ liegt anzeigen kann.

Was mache ich falsch? 
Message has been deleted

rich T

unread,
Jun 7, 2019, 10:00:13 PM6/7/19
to weewx-user

Try this:

Go to "/home/weewx/util/apache/conf.d"

Rename "conf.d" to "weewx.conf"

Modify the file since you are using apache 2.4.25.

Place a copy in the "/etc/apache2/conf-available" and "/etc/apache2/conf-enabled" folders

restart apache server

restart weewx and wait  5 minutes then try loading the web page.

Günther Wrana

unread,
Jun 8, 2019, 1:30:43 AM6/8/19
to weewx-user
Habe ich gemacht aber mir wird wieder nur die Apache2 Debian Default Page angezeigt.

rich T

unread,
Jun 8, 2019, 9:49:54 AM6/8/19
to weewx-user
Verify the following:

In the "/etc/apache2/conf.d" file

Alias /weewx /home/weewx/public_html
<Directory /home/weewx/public_html>
    Options FollowSymlinks
    AllowOverride None
    Require all granted
</Directory>

restart apache server

restart weewx and wait 5 minutes then try loading the web page.



Günther Wrana

unread,
Jun 12, 2019, 3:22:10 PM6/12/19
to weewx-user
Ich habe Apache auf dem Raspberry installiert, wo weewx läuft und die Daten meiner Wetterstation sammelt. Ich dachte, dass ich von anderen Geräten die im selben Netzwerk (WLAN oder LAN) sind die Daten im Browser anzeigen kann. Ich schaffe es zwar Apache am Raspberry zu installieren und die default Seite auf anderen Geräten über die IP des Raspberry im Browser zu sehen aber sonst nichts. Mit diversen Versuchen und Einstellungen schaffe ich es nicht. Ist das eigentlich der richtige Weg den schön langsam glaube ich, dass ich den falschen Weg gehe. Wie schaffe ich es die Wetterdaten auf dem Raspberry auf meinem mit Ubuntu installieren Rechner an zu sehen?

rich T

unread,
Jun 12, 2019, 10:39:20 PM6/12/19
to weewx-user
You are seeing the default Apache Page, when you type the your RPI address from your computer? What address are you typing?

From any device I can see my data using http://RPI IP address/weewx/.


On Wednesday, June 12, 2019 at 3:22:10 PM UTC-4, Günther Wrana wrote:

Günther Wrana

unread,
Jun 13, 2019, 10:11:54 AM6/13/19
to weewx-user

192.168.0.100 die IP Adresse des Raspberry

Dann wird mir immer nur die Seite angezeigt. Apache2 Debian Default Page

weil das mit den Einstellungen nicht funktioniert.


Andrew Milner

unread,
Jun 13, 2019, 10:52:53 AM6/13/19
to weewx-user
where are you putting the generated webpages??  ie what is HTMLROOT set to?

have you checked 
???

Günther Wrana

unread,
Jun 14, 2019, 3:33:30 AM6/14/19
to weewx-user
Genau so habe ich es gemacht nur funktioniert es nicht.

Nur ist mir nicht ganz klar was die HTML_ROOT ist. Ein Verzeichnis oder eine Datei oder wo steht das.

Andrew Milner

unread,
Jun 14, 2019, 4:30:53 AM6/14/19
to weewx-user
are there files actually in the /var/www/html/weewx directory??  

rich T

unread,
Jun 14, 2019, 10:43:14 PM6/14/19
to weewx-user
HTML_ROOT is a directory where your files are stored locally. Your weewx.conf  file will show the HTML_ROOT. If you type the following and watch the log, you should see where your files are stored.

sudo tail -f /var/log/syslog

Jun 14 22:25:19 raspberrypi weewx[25766]: cheetahgenerator: Generated 11 files for report Belchertown in 3.63 seconds
Jun 14 22:25:19 raspberrypi weewx[25766]: copygenerator: copied 2 files to /home/weewx/public_html

Again this will vary depending how you installed Weewx software.  You will need to point your browser to that location.
Message has been deleted

Günther Wrana

unread,
Jun 15, 2019, 3:07:27 AM6/15/19
to weewx-user
Das wurde mir angezeigt nach dem ich den Befehl eingegeben habe.

sudo tail -f /var/log/syslog

Jun 15 08:50:24 raspberrypi weewx[5203]: cheetahgenerator: Generated 8 files for report SeasonsReport in 1.80 seconds
Jun 15 08:50:25 raspberrypi weewx[5203]: imagegenerator: Generated 14 images for SeasonsReport in 1.16 seconds
Jun 15 08:50:25 raspberrypi weewx[5203]: copygenerator: copied 0 files to /home/weewx/public_html
Jun 15 08:55:25 raspberrypi weewx[5203]: manager: Added record 2019-06-15 08:55:00 CEST (1560581700) to database 'weewx.sdb'
Jun 15 08:55:25 raspberrypi weewx[5203]: manager: Added record 2019-06-15 08:55:00 CEST (1560581700) to daily summary in 'weewx.sdb'
Jun 15 08:55:25 raspberrypi weewx[5203]: restx: AWEKAS: Published record 2019-06-15 08:55:00 CEST (1560581700)
Jun 15 08:55:26 raspberrypi weewx[5203]: restx: Wunderground-PWS: Published record 2019-06-15 08:55:00 CEST (1560581700)
Jun 15 08:55:27 raspberrypi weewx[5203]: cheetahgenerator: Generated 8 files for report SeasonsReport in 1.78 seconds
Jun 15 08:55:28 raspberrypi weewx[5203]: imagegenerator: Generated 14 images for SeasonsReport in 1.15 seconds
Jun 15 08:55:28 raspberrypi weewx[5203]: copygenerator: copied 0 files to /home/weewx/public_html

Das die files in diesem Ordner liegen wusste ich.

Nur wie bringe ich apache2 dazu in diesem Ordner nach zu sehen.
Nach dem kopieren der weewx.conf

sudo cp util/apache/conf.d/weewx.conf /etc/apache2/conf.d

Sieht es in der conf.d von apache2 so aus.

Alias /weewx /home/weewx/public_html
<Directory /home/weewx/public_html>
  Options FollowSymlinks
  AllowOverride None
  Require all granted
</Directory>

Ist das richtig oder muss ich noch etwas tun um apache2 dazu zu bringen unter /home/weewx/public_html die Daten ab zu holen und im Browser an zu zeigen?

Ich dachte wenn ich alles so mache wie auf der Seite beschrieben http://www.weewx.com/docs/usersguide.htm#If_the_server_is_on_the_same_machine
funktioniert das.

rich T

unread,
Jun 15, 2019, 2:58:39 PM6/15/19
to weewx-user

Günther Wrana

unread,
Jun 18, 2019, 3:13:36 PM6/18/19
to weewx-user
Genau das steht in der conf.d/weewx.conf

Alias /weewx /home/weewx/public_html
<Directory /home/weewx/public_html>
  Options FollowSymlinks
  AllowOverride None
  Require all granted
</Directory>

Nur wenn ich auf meinem Ubuntu Rechner im Browser Chrome die IP 192.168.0.100/weewx eingebe zeigt er mir das an.

Not Found

The requested URL /weewx was not found on this server.


Apache/2.4.25 (Raspbian) Server at 192.168.0.100 Port 80

Was und warum mache ich falsch?

Günther Wrana

unread,
Jun 26, 2019, 11:29:12 AM6/26/19
to weewx-user
Es hat funktioniert nur muss die weewx.conf nicht so wie hier beschrieben.


Hier her kopiert werden.

sudo cp util/apache/conf.d/weewx.conf /etc/apache2/conf.d

Günther Wrana

unread,
Jun 26, 2019, 11:34:43 AM6/26/19
to weewx-user
Sondern hier her sudo cp util/apache/conf.d/weewx.conf /etc/apache2/conf-available

Danach habe ich diesen Befehl ausgeführt sudo a2enconf weewx.conf und dann apache2 neugestrartet.

Und siehe da ich kann plötzlich von meinem Rechner unter Angabe der IP Adresse 192.168.0.100/weewx auf die Datenbank und die index.html auf dem Raspberry zugreifen.

Danke an alle die mir geholfen haben.

Patrick Tranchant

unread,
Jun 26, 2019, 11:54:14 AM6/26/19
to weewx-user
halo
Haben Sie diese Art von Seite, wenn Sie nur die IP-Adresse des Servers eingeben, auf dem sich weewx befindet?


Patrick

Günther Wrana

unread,
Jun 27, 2019, 1:02:17 AM6/27/19
to weewx-user
Ja genau diese Seite wird mir angezeigt.

Günther Wrana

unread,
Nov 19, 2019, 11:45:05 AM11/19/19
to weewx-user
Es muss auch die weewx.conf richtig sein.

Bei Apache 2.2

Alias /weewx /home/weewx/public_html
<Directory /home/weewx/public_html>
  Options FollowSymlinks
  AllowOverride None
  Order allow,deny
  Allow from all 
</Directory>

Bei Apache 2.4

Alias /weewx /home/weewx/public_html
<Directory /home/weewx/public_html>
  Options FollowSymlinks
  AllowOverride None
  Require all granted
</Directory>
Dann funktioniert das auch.

Schrauber Huber

unread,
Mar 10, 2020, 2:42:33 PM3/10/20
to weewx-user
kannst du mir in einem kleinen kontex erklären wie das nun hinbekommen hast?
stehe genauso da

Günther Wrana

unread,
Mar 12, 2020, 2:19:58 AM3/12/20
to weewx-user
Hallo

was genau funktioniert nicht?
Es kommt darauf an welche Version von apache du hast.
Je nach dem musst du die .conf ändern.
Danach in den unten genannten Ordner kopieren.
Dann sudo a2enconf weewx.conf ausführen und apache neu starten.

So hat es bei mir funktioniert.

Grüße Günther

Günther Wrana

unread,
Mar 27, 2022, 1:27:15 PM3/27/22
to weewx-user
Hello friends After the third time I had problems with the new installation of weewx with the web server. I don't understand the configuration and syntax of Apache2. I now have lighttpd installed. With this web server it worked very quickly that the Raspberry and thus the data from the weather station were ONLINE. So my recommendation for software laymen like me is lighttpd web server.

Hallo Freunde

Nach dem ich beim dritten mal bei der neuinstallation von weewx mit dem Webserver wieder Problem hatte. Konfiguration Einstellen und Syntax verstehe ich bei Apache2 nicht. Habe ich jetzt lighttpd installiert. Mit diesem Webserver hat es sehr schnell funktioniert das der Raspberry und damit die Daten der Wetterstation ONLINE waren. Also meine Empfehlung für Software Laien wie mich lighttpd Webserver.

Rainer Lang

unread,
Mar 27, 2022, 3:44:44 PM3/27/22
to weewx...@googlegroups.com

apache2 ist eigentlich kein Problem - nur die Berechtigungen für die weewx Reportdateien müssen stimmen.
Das ist ein chmod-Befehl (chmod -R 755) für das Report-Verzeichnis, der Apache Zugriff darauf gibt.
Da braucht in der Konfiguration (.conf) für den Betrieb von weewx eigentlich nichts eingestellt zu werden.
Aber am Ende des Tages ist es für weewx egal, welcher Webserver im Einsatz ist (apache2, nginx, lighttpd ...).
Es ist allerdings unschädlich zu verstehen, wie ein Webserver arbeitet und wie das dazugehörige Berechtigungskonzept funktioniert. 😎

apache2 is not really a problem - only the permissions for the directory where the weewx reporting files reside need to be provided.
No changes in .conf files needed. No synthax to be learned.
But at the end of the day, for weewx purposes, it doesn't matter which web server is installed (apache2, nginx, lighttpd ...)
However, no harm in understanding hiow a web server works and what permissions need to be considered. 😎

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/af36bef5-0d9c-4230-a7e1-45b3c0b52597n%40googlegroups.com.

Günther Wrana

unread,
Mar 29, 2022, 2:07:31 PM3/29/22
to weewx-user
Hallo da ich nicht genau weis wie ein Webserver arbeitet und zu konfigurieren ist habe ich alles unter diesem Link versucht.


Am Ende habe ich dann eben lighttpd installiert und dort habe ich schneller heraus gefunden wie ich diesem Webserver sagen soll wo er hin sehen soll. Von diesem chmod -R 755 Befehl habe ich zwar etwas gelesen. Aber wo und warum ich diesen eingeben soll oder muss wusste ich nicht. Jedoch bin ich für neues immer dankbar. Also noch einen schönen
Gruß Günther Wrana


Hello since I do not know exactly how a web server works and is to be configured I have tried everything under this link.


In the end I just installed lighttpd and there I found out faster how to tell this web server where to look. I read something about this chmod -R 755 command. But where and why I should or must enter it I did not know. However, I am always grateful for new things.
So a nice greeting Günther Wrana
Reply all
Reply to author
Forward
0 new messages