Rewrite Rule

Bonjour,
Comme indiqué dans l’ancien forum la rewrite rule suivante permet de mieux faire marcher le mode proxy sur certain site ajax (testé notamment sur motionEye):

	RewriteEngine On
	RewriteCond "%{HTTP_REFERER}" ".*miniProxy.php\?(.*)"
	RewriteRule "(.*)miniProxy.php([^?].*)" "$1miniProxy.php?%1$2&%{QUERY_STRING}" [PT,L]

Je viens de déployer en beta une version permettant de l’installer automatiquement (via l’installation de dépendance dans « Gestion des plugins »). Je la passerai en stable dans quelque jours.

Je viens de déployer cette version en stable.

Salut,
Avec la nouvelle version stable, cela me permet d’accéder à Motioneye et de faire des configurations mais les images des caméras ne sont pas affichées. C’est mon truc ou ça t’arrive quand même?
merci

Bonjour @david_g_m ,
Pour moi les images de caméra s’affichent.
Après avoir installer la maj stable il faut aller dans « Gestion des plugins » et lancer l’installation des dépendances (c’est cette action qui installe la rewrite rule).

Si cette action a bien été faite le message "La rewrite rule semble être déjà installée. " doit être visible. C’est bien le cas chez toi?

Je dois rajouter cette partie dans la doc quand j’aurais un peu de temps.

Salut,
Merci pour la réponse.
J’ai lancé l’installation des dépendances mais il y a une erreur.

Jeedom 3.3.39, debian 9

D’après les screenshots la rewrite rule a bien était rajoutée a la conf apache. Mais apache n’a pas réussi a se recharger.
Peux tu essayer d’exécuter en ssh les commandes « systemctl status apache2.service » et « journalctl -xe » ca devrait donner des info sur pourquoi apache arrive pas a recharger la conf.

Sinon pour que j’essaye de reproduire le problem peux-tu me dire sur quelle machine est installée ton debian 9 ? (arm (raspberry pi par exemple) ou pc? directement sur la machine ou dans un docker …)

Salut,

debian 9 installé directement dans NUC dédié exclusivement à jeedom

systemctl status apache2.service
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset:
Drop-In: /etc/systemd/system/apache2.service.d
└─privatetmp.conf
Active: active (running) (Result: exit-code) since Sun 2020-01-12 20:07:19 CE
Process: 21575 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=1/
Process: 429 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCES
Main PID: 541 (apache2)
Tasks: 17 (limit: 4915)
CGroup: /system.slice/apache2.service
├─ 541 /usr/sbin/apache2 -k start
├─ 2115 /usr/sbin/apache2 -k start
├─ 3742 /usr/sbin/apache2 -k start
├─ 7254 /usr/sbin/apache2 -k start
├─14968 /usr/sbin/apache2 -k start
├─15060 /usr/sbin/apache2 -k start
├─15688 /usr/sbin/apache2 -k start
├─15839 /usr/sbin/apache2 -k start
├─16001 php /var/www/html/core/class/…/…/core/php/jeeScenario.php s
├─17072 /usr/sbin/apache2 -k start
├─18356 /usr/sbin/apache2 -k start
├─18380 /usr/sbin/apache2 -k start
├─18405 /usr/sbin/apache2 -k start

journalctl -xe
Hint: You are currently not seeing messages from other users and the system.
Users in the ‹ systemd-journal › group can see all messages. Pass -q to
turn off this notice.
No journal files were opened due to insufficient permissions.

@david_g_m, tu peux essayer « sudo journalctl -xe » (car ton user n’avait pas le droit de faire cette commande).
Éventuellement faire un « sudo systemctl reload apache2 » juste avant pour loguer l’erreur a la fin des logs de journalctl.

ene 21 20:56:06 jeedom sudo[8297]: pam_unix(sudo:session): session opened for us
ene 21 20:56:06 jeedom sudo[8163]: pam_unix(sudo:session): session closed for us
ene 21 20:56:06 jeedom sudo[8301]: www-data : TTY=unknown ; PWD=/var/www ; USER=
ene 21 20:56:06 jeedom sudo[8301]: pam_unix(sudo:session): session opened for us
ene 21 20:56:06 jeedom sudo[8297]: pam_unix(sudo:session): session closed for us
ene 21 20:56:08 jeedom sudo[8334]: www-data : TTY=unknown ; PWD=/var/www ; USER=
ene 21 20:56:08 jeedom sudo[8334]: pam_unix(sudo:session): session opened for us
ene 21 20:56:08 jeedom sudo[8334]: pam_unix(sudo:session): session closed for us
ene 21 20:56:08 jeedom sudo[8342]: www-data : TTY=unknown ; PWD=/var/www ; USER=
ene 21 20:56:08 jeedom sudo[8342]: pam_unix(sudo:session): session opened for us
ene 21 20:56:11 jeedom sudo[8403]: www-data : TTY=unknown ; PWD=/var/www ; USER=
ene 21 20:56:11 jeedom sudo[8403]: pam_unix(sudo:session): session opened for us
ene 21 20:56:11 jeedom sudo[8412]: www-data : TTY=unknown ; PWD=/var/www ; USER=
ene 21 20:56:11 jeedom sudo[8412]: pam_unix(sudo:session): session opened for us
ene 21 20:56:11 jeedom sudo[8342]: pam_unix(sudo:session): session closed for us
ene 21 20:56:11 jeedom sudo[8403]: pam_unix(sudo:session): session closed for us
ene 21 20:56:11 jeedom sudo[8301]: pam_unix(sudo:session): session closed for us
ene 21 20:56:11 jeedom sudo[8429]: www-data : TTY=unknown ; PWD=/var/www ; USER=
ene 21 20:56:11 jeedom sudo[8429]: pam_unix(sudo:session): session opened for us
ene 21 20:56:16 jeedom sudo[8429]: pam_unix(sudo:session): session closed for us
ene 21 20:56:16 jeedom sudo[8412]: pam_unix(sudo:session): session closed for us
ene 21 20:56:19 jeedom sudo[8479]: jeedom : TTY=pts/0 ; PWD=/home/casa ; USER=
ene 21 20:56:19 jeedom sudo[8479]: pam_unix(sudo:session): session opened for us

sudo systemctl reload apache2
Job for apache2.service failed because the control process exited with error code.
See « systemctl status apache2.service » and « journalctl -xe » for details.

systemctl status apache2.service
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset:
Drop-In: /etc/systemd/system/apache2.service.d
└─privatetmp.conf
Active: active (running) (Result: exit-code) since Sun 2020-01-12 20:07:19 CE
Process: 11740 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=1/
Process: 429 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCES
Main PID: 541 (apache2)
Tasks: 15 (limit: 4915)
CGroup: /system.slice/apache2.service
├─ 541 /usr/sbin/apache2 -k start
├─ 2254 /usr/sbin/apache2 -k start
├─ 6502 /usr/sbin/apache2 -k start
├─ 7254 /usr/sbin/apache2 -k start
├─15839 /usr/sbin/apache2 -k start
├─16485 /usr/sbin/apache2 -k start
├─17072 /usr/sbin/apache2 -k start
├─18380 /usr/sbin/apache2 -k start
├─18405 /usr/sbin/apache2 -k start
├─29420 /usr/sbin/apache2 -k start
├─29445 /usr/sbin/apache2 -k start
├─29993 /usr/sbin/apache2 -k start
├─31075 /usr/sbin/apache2 -k start
lines 1-23
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enable
Drop-In: /etc/systemd/system/apache2.service.d
└─privatetmp.conf
Active: active (running) (Result: exit-code) since Sun 2020-01-12 20:07:19 CET; 1 w
Process: 11740 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=1/FAILUR
Process: 429 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Main PID: 541 (apache2)
Tasks: 15 (limit: 4915)
CGroup: /system.slice/apache2.service
├─ 541 /usr/sbin/apache2 -k start
├─ 2254 /usr/sbin/apache2 -k start
├─ 6502 /usr/sbin/apache2 -k start
├─ 7254 /usr/sbin/apache2 -k start
├─15839 /usr/sbin/apache2 -k start
├─16485 /usr/sbin/apache2 -k start
├─17072 /usr/sbin/apache2 -k start
├─18380 /usr/sbin/apache2 -k start
├─18405 /usr/sbin/apache2 -k start
├─29420 /usr/sbin/apache2 -k start
├─29445 /usr/sbin/apache2 -k start
├─29993 /usr/sbin/apache2 -k start
├─31075 /usr/sbin/apache2 -k start
lines 1-23
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/apache2.service.d
└─privatetmp.conf
Active: active (running) (Result: exit-code) since Sun 2020-01-12 20:07:19 CET; 1 weeks 2 d
Process: 11740 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=1/FAILURE)
Process: 429 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Main PID: 541 (apache2)
Tasks: 15 (limit: 4915)
CGroup: /system.slice/apache2.service
├─ 541 /usr/sbin/apache2 -k start
├─ 2254 /usr/sbin/apache2 -k start
├─ 6502 /usr/sbin/apache2 -k start
├─ 7254 /usr/sbin/apache2 -k start
├─15839 /usr/sbin/apache2 -k start
├─16485 /usr/sbin/apache2 -k start
├─17072 /usr/sbin/apache2 -k start
├─18380 /usr/sbin/apache2 -k start
├─18405 /usr/sbin/apache2 -k start
├─29420 /usr/sbin/apache2 -k start
├─29445 /usr/sbin/apache2 -k start
├─29993 /usr/sbin/apache2 -k start
├─31075 /usr/sbin/apache2 -k start
lines 1-23
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/apache2.service.d
└─privatetmp.conf
Active: active (running) (Result: exit-code) since Sun 2020-01-12 20:07:19 CET; 1 weeks 2 days ago
Process: 11740 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=1/FAILURE)
Process: 429 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Main PID: 541 (apache2)
Tasks: 15 (limit: 4915)
CGroup: /system.slice/apache2.service
├─ 541 /usr/sbin/apache2 -k start
├─ 2254 /usr/sbin/apache2 -k start
├─ 6502 /usr/sbin/apache2 -k start
├─ 7254 /usr/sbin/apache2 -k start
├─15839 /usr/sbin/apache2 -k start
├─16485 /usr/sbin/apache2 -k start
├─17072 /usr/sbin/apache2 -k start
├─18380 /usr/sbin/apache2 -k start
├─18405 /usr/sbin/apache2 -k start
├─29420 /usr/sbin/apache2 -k start
├─29445 /usr/sbin/apache2 -k start
├─29993 /usr/sbin/apache2 -k start
├─31075 /usr/sbin/apache2 -k start
lines 1-23

J’ai perdu l’accès à jeedom.

apache2.service is not active, cannot reload.
jeedom@jeedom:~$ sudo apachectl start
Invoking ‹ systemctl start apache2 ›.
Use ‹ systemctl status apache2 › for more info.
Job for apache2.service failed because the control process exited with error cod e.
See « systemctl status apache2.service » and « journalctl -xe » for details.
Action ‹ start › failed.
The Apache error log may have more information.
jeedom@jeedom:~$ systemctl status apache2.service
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset:
Drop-In: /etc/systemd/system/apache2.service.d
└─privatetmp.conf
Active: failed (Result: exit-code) since Tue 2020-01-21 21:11:21 CET; 25s ago
Process: 2724 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILU
lines 1-6/6 (END)
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/apache2.service.d
└─privatetmp.conf
Active: failed (Result: exit-code) since Tue 2020-01-21 21:11:21 CET; 25s ago
Process: 2724 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

je pense avoir trouver le problème (je l’ai reproduit en installant apache sur mon PC).
Je viens de deployer une maj qui corrige le problème.
Mais si apache s’est arrété la maj va pas être possible.

Si c’est bien le même problème il suffit de faire en ssh:

sudo ln -s ../mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load 
sudo systemctl start apache2

Ca devrait réparer apache et normalement les images de motionEye devraient aussi être visible.

Il a été corrigé, je peux y accéder et les images sont vues.:sweat_smile:
Merci beaucoup pour votre temps, avec cette amélioration votre pluggin devient indispensable pour moi.
salutations

1 « J'aime »