joglomedia / LEMPer

LEMPer Stack is terminal-based LEMP / LNMP ( Linux, Nginx, MariaDB, PostgreSQL, MongoDB, Redis, Memcache, PHP, Secure FTP ) auto installer and virtual host manager for Debian & Ubuntu cloud or virtual server (vps) and on-premise (bare metal).
https://lemper.cloud/
GNU General Public License v3.0
207 stars 56 forks source link

Nginx [warn] 99504#99504: the "listen ... http2" directive is deprecated #171

Open joglomedia opened 2 months ago

joglomedia commented 2 months ago
root@www:~# nginx -t
2024/07/06 09:14:28 [warn] 99504#99504: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/sites-enabled/00-default:150
2024/07/06 09:14:28 [warn] 99504#99504: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/sites-enabled/00-default:151
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

the old format is

server {
    listen      90.91.45.3:443 ssl http2;

and the new format for nginx >= 1.25.1 is

server {
    listen      90.91.45.3:443 ssl;
    http2  on;

Ref:

IIXINGCHEN commented 1 month ago

How to use the lemper-cli command to add the correct virtual machine and access it correctly?

joglomedia commented 1 month ago

How to use the lemper-cli command to add the correct virtual machine and access it correctly?

lemper-cli used for managing virtual host, as mentioned in the README, here is an example command creating new virtual host (installing WordPress site).

lemper-cli site add -u ${USER} -d example.test -f wordpress \
-w ${HOME}/webapps/example.test --install-app

${USER} replace it by using created user during LEMPer installation ${HOME} replace it with path to user home directory