Ubuntu 22.04 - Nginx is not installed

Hi :slight_smile:

At the monment i run this site: https:/www.futurenode.dk on Ubuntu 20.04. :slight_smile:

It’s running perfectly. - But I have got a new server with Ubuntu 22.04. :slight_smile:

The problem is “ghost-cli” can’t find nginx on my ubuntu 22.04 server.

:heavy_check_mark: Setting up “ghost” mysql user
Nginx is not installed. Skipping Nginx setup.
:information_source: Setting up Nginx [skipped]
Nginx setup task was skipped, skipping SSL setup
:information_source: Setting up SSL [skipped]

I know ubuntu 22.04 is not supported yet, but I hope I can make the move to my new server now without going back to ubuntu 20.04!

I’m thinking copy/editing my old vhost file from my old server and removing the SSL part from the file!

After this, I will make my own vhost file on the new server, and then using certbot to create the SSL cert!

Ghost-CLI version: 1.21.0
Ghost version: 5.2.3 (at /var/www/ghost)

node -v

nginx -v
nginx version: nginx/1.22.0

mysql -V
mysql Ver 8.0.29-0ubuntu0.22.04.2 for Linux on x86_64 ((Ubuntu))

Is this stupid? Are this a security risk? Should I waith with the upgrade? Or can make the upgrade!




I am also getting the same error. This made me think about whether I should fall back to Ubuntu 20.04 or not.

Ubuntu 22.04 is not a supported platform, whereas 20.04 is. Moreover, 20.04 is supported until 2025.

Ubuntu do not recommend LTS users upgrade until, at least, the first point release later this year, so I’d say it’s premature to use 22.04 on production just now.

Personally, I’d wait until the 18.04 LTS is EOL before considering the upgrade. By then Ghost support for 22.04.1 is likely.

Ok. Thanks for your post @mjw - Maybe I will wait to upgrade to ubuntu 22.04 into ghosts support it

1 Like

Here’s the code that checks if Nginx is installed:

If you use systemctl status '*nginx*', do you see that nginx.service is running? It should say “active (running)” in the output. If the service name is something other than nginx.service, then you can set an environment variable to reflect the name of your service

env NGINX_PROGRAM_NAME='some-other-service-name' ghost install

Hi @markstos

First, i want to say thanks for your reply… - If I run: systemctl status '*nginx*'

I get this output…

guide@guide:~$ systemctl status '*nginx*'
● nginx.service - nginx - high performance web server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-06-20 13:35:54 UTC; 21s ago
       Docs: https://nginx.org/en/docs/
    Process: 750 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS)
   Main PID: 755 (nginx)
      Tasks: 3 (limit: 4538)
     Memory: 4.2M
        CPU: 8ms
     CGroup: /system.slice/nginx.service
             ├─755 "nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf"
             ├─756 "nginx: worker process" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""
             └─757 "nginx: worker process" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""

Jun 20 13:35:54 guide systemd[1]: Starting nginx - high performance web server...
Jun 20 13:35:54 guide systemd[1]: Started nginx - high performance web server.

Are this fine??? It looks fine to me… Did you have any other thing I can check?? or a fix??




If this can help you - I get this output when I run nginx -V

guide@guide:~$ nginx -V
nginx version: nginx/1.22.0
built by gcc 11.2.0 (Ubuntu 11.2.0-19ubuntu1)
built with OpenSSL 3.0.2 15 Mar 2022
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-g -O2 -ffile-prefix-map=/data/builder/debuild/nginx-1.22.0/debian/debuild-base/nginx-1.22.0=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC' --with-ld-opt='-Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie'

I can’t spot the issue, but it’s clear from what I’ve seen so far that the issue is not the environment, but that the check for the environment is broken. You can find this file stored somewhere on your drive:

(try locate extensions/index.js)

You can edit the isSupported() function so that it just contains return true; and then try again.

Eventually the Ghost devs will test with Ubuntu 22.04 and fix this check.

One thing I looked into was whether there was a bug in the systeminformation module that’s being used to list system services. But I see no evidence of that in that project’s history or issue track. I also tested the latest version of systeminformation locally. Finally, I checked that ghost-cli is depending on the newest version of the module, so there shouldn’t be an issue there either.

Hi @markstos.

Thanks for the help. I will try the thing you talked about

Regards Thomas

1 Like