Suite à la mise à jour récente de très nombreux packages Debian, impossible d’accéder à mon serveur dédié par le Web. Tout le reste fonctionne (SSH, mail, etc.), j’en conclue donc que le problème vient de Nginx.
-> Le fichier /var/log/nginx/error.log contient cette ligne :
2018/01/18 10:20:15 [emerg] 16913#16913: unknown directive "access_by_lua_file" in /etc/nginx/conf.d/******.nohost.me.conf:6
Celle-ci renvoit donc à la ligne du fichier de conf netflix qui est “access_by_lua_file /usr/share/ssowat/access.lua;”. Rapport avec le SSO ? Mais pourquoi “unknow directive” ?
-> Quand je fais un ‘systemctl status nginx.service’ j’obtiens ça
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since jeu. 2018-01-18 10:20:15 CET; 11s ago
Docs: man:nginx(8)
Process: 16913 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, s
janv. 18 10:20:15 ****** systemd[1]: Starting A high performance web server and a reverse proxy serve
janv. 18 10:20:15 ****** nginx[16913]: nginx: [emerg] unknown directive "access_by_lua_file" in /etc/
janv. 18 10:20:15 ****** nginx[16913]: nginx: configuration file /etc/nginx/nginx.conf test failed
janv. 18 10:20:15 ****** systemd[1]: nginx.service: Control process exited, code=exited status=1
janv. 18 10:20:15 ****** systemd[1]: Failed to start A high performance web server and a reverse prox
janv. 18 10:20:15 ****** systemd[1]: nginx.service: Unit entered failed state.
janv. 18 10:20:15 ****** systemd[1]: nginx.service: Failed with result 'exit-code'.
Ca ne m’étais jamais arrivé, et à vrai dire je sais pas trop comment m’en sortir Si quelqu’un a un conseil pour m’aider à le dépanner, ce serait vraiment très sympa.
La première commande donne ça (donc a priori toujours sous Jessie ?) :
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.10 (jessie)
Release: 8.10
Codename: jessie
La deuxième :
iU libnginx-mod-http-auth-pam 1.10.3-1+deb9u1~bpo8+2 amd64 PAM authentication module for Nginx
iU libnginx-mod-http-cache-purge 1.10.3-1+deb9u1~bpo8+2 amd64 Purge content from Nginx caches
iU libnginx-mod-http-dav-ext 1.10.3-1+deb9u1~bpo8+2 amd64 WebDAV missing commands support for Nginx
iU libnginx-mod-http-echo 1.10.3-1+deb9u1~bpo8+2 amd64 Bring echo and more shell style goodies to Nginx
iU libnginx-mod-http-fancyindex 1.10.3-1+deb9u1~bpo8+2 amd64 Fancy indexes module for the Nginx
iU libnginx-mod-http-geoip 1.10.3-1+deb9u1~bpo8+2 amd64 GeoIP HTTP module for Nginx
iU libnginx-mod-http-headers-more-filter 1.10.3-1+deb9u1~bpo8+2 amd64 Set and clear input and output headers for Nginx
iU libnginx-mod-http-image-filter 1.10.3-1+deb9u1~bpo8+2 amd64 HTTP image filter module for Nginx
iU libnginx-mod-http-lua 1.10.3-1+deb9u1~bpo8+2 amd64 Lua module for Nginx
iU libnginx-mod-http-ndk 1.10.3-1+deb9u1~bpo8+2 amd64 Nginx Development Kit module
iU libnginx-mod-http-perl 1.10.3-1+deb9u1~bpo8+2 amd64 Perl module for Nginx
iU libnginx-mod-http-subs-filter 1.10.3-1+deb9u1~bpo8+2 amd64 Substitution filter module for Nginx
iU libnginx-mod-http-uploadprogress 1.10.3-1+deb9u1~bpo8+2 amd64 Upload progress system for Nginx
iU libnginx-mod-http-upstream-fair 1.10.3-1+deb9u1~bpo8+2 amd64 Nginx Upstream Fair Proxy Load Balancer
iU libnginx-mod-http-xslt-filter 1.10.3-1+deb9u1~bpo8+2 amd64 XSLT Transformation module for Nginx
iU libnginx-mod-mail 1.10.3-1+deb9u1~bpo8+2 amd64 Mail module for Nginx
iU libnginx-mod-nchan 1.10.3-1+deb9u1~bpo8+2 amd64 Fast, flexible pub/sub server for Nginx
iU libnginx-mod-stream 1.10.3-1+deb9u1~bpo8+2 amd64 Stream module for Nginx
iU nginx-common 1.10.3-1+deb9u1~bpo8+2 all small, powerful, scalable web/proxy server - common files
iU nginx-extras 1.10.3-1+deb9u1~bpo8+2 amd64 nginx web/proxy server (extended version)
C’est moi où il m’a mis un Nginx Stretch sur un Jessie ? (ou je comprends mal ?)
Ca expliquerait plutôt bien ton problème !
As-tu des fichiers dans le répertoire /etc/nginx/modules-enabled/ et le répertoire /usr/share/nginx/modules-available ?
C’est dans ton fichier à la ligne 6 il y a une directive inconnue.
ouvre le et regarde la ligne 6… tu peux la commenter en ajoutant un dieze au début de la ligne. et tester ta conf nginx en lancant la commande nginx -t
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name toto.fr;
ssl_certificate /etc/yunohost/certs/toto.fr/crt.pem;
ssl_certificate_key /etc/yunohost/certs/toto.fr/key.pem;
ssl_session_timeout 5m;
ssl_session_cache shared:SSL:50m;
ssl_prefer_server_ciphers on;
# Ciphers with intermediate compatibility
# https://mozilla.github.io/server-side-tls/ssl-config-generator/?server=nginx-1.6.2&openssl=1.0.1t&hsts=yes&pro$
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-A$
# Ciphers with modern compatibility
# https://mozilla.github.io/server-side-tls/ssl-config-generator/?server=nginx-1.6.2&openssl=1.0.1t&hsts=yes&pro$
# Uncomment the following to use modern ciphers, but remove compatibility with some old clients (android < 5.0, $
#ssl_protocols TLSv1.2;
#ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-$
# Uncomment the following directive after DH generation
# > openssl dhparam -out /etc/ssl/private/dh2048.pem -outform PEM -2 2048
#ssl_dhparam /etc/ssl/private/dh2048.pem;
add_header Strict-Transport-Security "max-age=31536000;";
access_by_lua_file /usr/share/ssowat/access.lua;
include conf.d/toto.fr.d/*.conf;
include conf.d/yunohost_admin.conf.inc;
include conf.d/yunohost_api.conf.inc;
access_log /var/log/nginx/toto.fr-access.log;
error_log /var/log/nginx/toto.fr-error.log;