Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc Apache configuration #607

Closed
WolfgangFahl opened this issue Apr 17, 2017 · 28 comments
Closed

Misc Apache configuration #607

WolfgangFahl opened this issue Apr 17, 2017 · 28 comments

Comments

@WolfgangFahl
Copy link
Contributor

I have updated my Volkszähler installation following the instructions at:

http://wiki.volkszaehler.org/howto/git

The first issue I encountered was a http 500 and an entry in the apache 2 error log:

Mon Apr 17 07:58:05.353126 2017] [core:alert] [pid 13522] [client 2.0.0.102:56945] /var/www/volkszaehler.org.2017/.htaccess: Require not allowed here

to fix this I had to add Authconfig to the AllowOverride options in the vz configuration of apache:

Alias /vz2017/  "/var/www/volkszaehler.org.2017/htdocs/"
<Directory /var/www/volkszaehler.org.2017>
  Options Indexes FollowSymLinks MultiViews
  AllowOverride FileInfo Limit Options Indexes Authconfig
  Require all granted
</Directory>

you might want to add this info to the documentation.

The next issue is a display of "Network Error" - Internal Server Error dialog. If I ignore this I get
Javascript Runtime Error "TypeError: vz.capabilities.definitions.entities is undefined"

I have cleared the vz_ cookie and the cache to no avail.

Please advise

@andig
Copy link
Contributor

andig commented Apr 17, 2017 via email

@andig
Copy link
Contributor

andig commented Apr 17, 2017

@WolfgangFahl could you add the missing AuthConfig to the wiki?

There is an additional mistake: it must be composer update, not install for this purpose.

@J-A-U
Copy link
Collaborator

J-A-U commented Apr 17, 2017

@WolfgangFahl Ich bin der Meinung das du die Änderung an der falschen Stelle ins Wiki gepackt hast.
Die Seite die du da editiert hast bezieht sich ganz konkret auf den Umgang mit git, Hinweise zu Apache sind da unpassend.

Mir ist die Ursache für das Problem nicht ganz klar (mit Webserverkonfig kenn ich mich nicht aus), scheint mir aber eins zu sein das wir auch bei Neuinstallationen haben. Würde dann hier hingehören: http://wiki.volkszaehler.org/software/middleware/installation

@J-A-U
Copy link
Collaborator

J-A-U commented Apr 21, 2017

Nachdem ich mich jetzt eingelesen habe bin ich mir sicher das es ein grundsätzliches Problem ist das sowohl Apache 2.4 als auch 2.2 betrifft, in der Installationsanleitung für die MW aber nicht behandelt wird.

Daher die Installationsanleitung korrigiert (den Teil zu Debian Jessie muss ich noch prüfen) und den Abschnitt aus dem git-howto entfernt.

Von mir aus können wir hier zumachen.

@andig
Copy link
Contributor

andig commented Apr 21, 2017

Yup, scheint mir auch so.

@andig andig closed this as completed Apr 21, 2017
@andig
Copy link
Contributor

andig commented Apr 22, 2017

Ich habe noch ein Problem mit der Apache Conf gefunden: falls /middleware/... funkionieren soll wird auch

AddType application/x-httpd-php .php

In den MIME Types benötigt, siehe https://serverfault.com/questions/372733/apache-file-negotiation-failed

@J-A-U
Copy link
Collaborator

J-A-U commented Apr 22, 2017

Hm, ok.

Je genauer ich mir die bestehende Anleitung im Wiki anschau umso falscher kommt sie mir vor. Gerade auch im Bezug auf die sehr knappe Anpassung unter "Jessie": <Directory /> ist bei mir aufm Rpi gar nicht Konfiguriert.

@andig
Copy link
Contributor

andig commented Apr 23, 2017

Ich mache mal wieder auf. Mir ist auch aufgefallen dass die RewriteRules nicht vernünftig funktionieren wenn die mod_negotiation geladen ist. Wir brauchen also noch ein Options -MultiViews, siehe auch #611 (comment)

@andig andig reopened this Apr 23, 2017
@andig andig changed the title Update issues Misc Apache configuration Apr 23, 2017
@TobiasScheinert
Copy link

Hi,
ich bin mir nicht ganz sicher, ob das hier rein gehört. Ich hatte meinen Apache 2.4.10 (Raspbian) folgendermaßen eingerichtet (ich habe +MultiViews und -MultiViews ausprobiert):

DocumentRoot /srv/www/empty
Alias /volkszaehler "/srv/www/volkszaehler/htdocs"
<Directory "/srv/www/volkszaehler/htdocs/">
  Options +Indexes +FollowSymLinks -MultiViews
  AllowOverride FileInfo Limit Options Indexes Authconfig
  Require all granted
</Directory>

An und für sich hat alles einwandfrei funktioniert, sprich das Frontend hat funktioniert, und ich konnte auch problemlos per vzlogger Daten importieren. Allerdings schreibt mir dann der Apache bei jedem Zugriff AH01630: client denied by server configuration: /srv/www/empty/data ins Log.

Wenn ich den DocumentRoot auf /srv/www/volkszaehler/htdocs setze verschwindet die Fehlermeldung. Ich vermute mal, dass der Apache die Art und Weise, wie der middleware.php die Parameter übergeben werden, nicht gut findet. Vielleicht weiß ja von euch jemand Rat.

Gruß Tobias

@andig
Copy link
Contributor

andig commented Jul 31, 2017

@TobiasScheinert das scheint mir eine sehr individuelle Apache Config zu sein. Hat nix mit dem Standard VZ Setup zu tun? Für Diskussionen bitte die ML benutzen...

@christian-weiss
Copy link
Contributor

This ticket was not updated for some month. Problem seams to be resolved or discussed in mailing list.
Please close this ticket by now.

@J-A-U
Copy link
Collaborator

J-A-U commented Dec 21, 2017

Problem seams to be resolved or discussed in mailing list.

No and no.

@christian-weiss
Copy link
Contributor

@WolfgangFahl Do you still have that problem? If yes, please update to the latest "release" following the wiki. If the issue still remains please provide your log files (apache and php).

@J-A-U
Copy link
Collaborator

J-A-U commented Dec 21, 2017

I'm pretty sure either WolfgangFahl or TobiasScheinert don't have a problem running their vz.

But, we have a generic issue with our apache configuration in terms of wiki documentation and the delivered rpi-image.

@WolfgangFahl
Copy link
Contributor Author

I have not tried to update again but I'am trying to do so soon.

@WolfgangFahl
Copy link
Contributor Author

WolfgangFahl commented Nov 4, 2018

Heute habe ich einen neuen Versuch gemacht.

git pull
composer update

Dann wieder probiert .
Erste Meldung "Network error - Internal Server error"

@J-A-U
Copy link
Collaborator

J-A-U commented Nov 4, 2018

If the issue still remains please provide your log files (apache and php).

@WolfgangFahl
Copy link
Contributor Author

WolfgangFahl commented Nov 4, 2018

I am getting frustrated. If the software would give a hint where to look that would be a major improvement.

This is the apache log entry:

2.0.0.25 - - [04/Nov/2018:11:46:20 +0100] "GET /vz2018/ HTTP/1.1" 200 3095 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:62.0) Gecko/20100101 Firefox/62.0"
2.0.0.25 - - [04/Nov/2018:11:46:20 +0100] "GET /vz2018/vendor/jquery-ui/jquery-ui.min.css HTTP/1.1" 200 8230 "http://vz2018.bitplan.com/vz2018/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:62.0) Gecko/20100101 Firefox/62.0"
2.0.0.25 - - [04/Nov/2018:11:46:20 +0100] "GET /vz2018/css/sprites.css HTTP/1.1" 200 1068 "http://vz2018.bitplan.com/vz2018/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:62.0) Gecko/20100101 Firefox/62.0"
2.0.0.25 - - [04/Nov/2018:11:46:20 +0100] "GET /vz2018/css/style.css HTTP/1.1" 200 1886 "http://vz2018.bitplan.com/vz2018/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:62.0) Gecko/20100101 Firefox/62.0"
2.0.0.25 - - [04/Nov/2018:11:46:20 +0100] "GET /vz2018/vendor/autobahn.min.js HTTP/1.1" 200 10066 "http://vz2018.bitplan.com/vz2018/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:62.0) Gecko/20100101 Firefox/62.0"
2.0.0.25 - - [04/Nov/2018:11:46:20 +0100] "GET /vz2018/vendor/moment.min.js HTTP/1.1" 200 21582 "http://vz2018.bitplan.com/vz2018/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:62.0) Gecko/20100101 Firefox/62.0"

Where would I find the relevant php files?
Which configuration files need modifications except apache?
Does the database need an upgrade?

@WolfgangFahl
Copy link
Contributor Author

WolfgangFahl commented Nov 4, 2018

Now checking installation steps as in https://wiki.volkszaehler.org/software/middleware/installation:
sudo apt-get install git-core libapache2-mod-php7.0 php7.0-cli php7.0-mysql php-apcu mysql-server mysql-client php7.0-xml php-mbstring ca-certificates apache2
added php-apcu-bc and php-apcu

same error message ...

a2enmod rewrite
Module rewrite already enabled

@WolfgangFahl
Copy link
Contributor Author

Ok the solution is simple I feel a bit stupid but would recommend to update the documentation.
Of course volkszaehler.conf.php needs to be merged from the old installation ...
If the software would detect a missing volkszaehler.conf.php that would be a major improvement. E.g. mediawiki automatically goes into installation mode in this case. For an update it would be helpful to ask for the old configuration file and copy the relevant infos. It would also be helpful to split the configuration file into a part with the credentials and a part with the other configurations (that are more volatile). Also the configuration should not be in the same directory as the stuff that is handled by git - a pull request would accedentialy give passwords and the like to the git repository ...

@andig
Copy link
Contributor

andig commented Nov 4, 2018

I am getting frustrated. If the software would give a hint where to look that would be a major improvement.

Wie ich vor ganz langer Zeit schrieb:

For the internal server error please look into the apache log file. Most likely an incomplete installation of config missing.

Das Wiki kannst Du selbst updaten!

@andig
Copy link
Contributor

andig commented Nov 4, 2018

Also the configuration should not be in the same directory as the stuff that is handled by git - a pull request would accedentialy give passwords and the like to the git repository ...

Die Dateinamen sind unterschiedlich. In 8 Jahren VZ war das kein Problem.

@J-A-U
Copy link
Collaborator

J-A-U commented Nov 4, 2018

Um es ein wenig zu erläutern: Die Beispielkonfig wird bei Erstinstallation einmalig kopiert und fertig. Die lokale Konfigurationsdatei, mit den sicherheitsrelevanten Daten, ist fürs git explizit ausgeblendet. Sie wird daher nicht hochgeladen.

Falls du eine Möglichkeit siehst ein Script zu schreiben das alte und neue Konfigurationen ineinanderwürfelt sind wir für deine Unterstützung dankbar.

@andig
Copy link
Contributor

andig commented Mar 22, 2019

Ich denke das Thema ist erledigt. Das VZ 2.0 Image wird vstl. ohne Apache funktionieren.

@andig andig closed this as completed Mar 22, 2019
@WolfgangFahl
Copy link
Contributor Author

The problem reappears in 2020 after upgrading to php 7.4. Again i need to investigate the configuation issues instead of getting hints by the software itself.

@andig
Copy link
Contributor

andig commented Oct 3, 2020

Mir ist nicht bekannt, dass wir ein neues Image mit php 7.4 haben? Für Änderungen Deiner lokalen Konfiguration bist Du natürlich selbst verantwortlich. Die formulierte Anspruchshaltung kann ich nicht teilen. Wenn es hier ein konkretes Problem gibt gerne neues Issue aufmachen.

@WolfgangFahl
Copy link
Contributor Author

WolfgangFahl commented Oct 4, 2020

PHP 7.4 ist auf der Serverseite und da tauchen erneut irreführende Fehlermeldungen auf:
grafik
für die Software aus 2018 die bisher lief und konfiguriert ist.
und
grafik
für die Software mit aktuellem Stand, die nicht konfiguriert ist. Mein Problem ist nun wie ich von diesen beiden Meldungen aus zu einem funktionierenden System komme.

@andig
Copy link
Contributor

andig commented Oct 4, 2020

Wenn es hier ein konkretes Problem gibt gerne neues Issue aufmachen.

Wie gesagt. Mach gerne ein neues issue auf. Einschl. Beschreibung was Du ggü funktionierendem System geändert hast, Apache Log und Blick in die Browserkonsole.

@volkszaehler volkszaehler locked as off-topic and limited conversation to collaborators Oct 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants