Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

intrepidws's avatar

Upgrade Forge server from nginx 1.15.8

My Forge server has nginx 1.15.8. My PCI Compliance scan has failed because this version is EOL and out of service. So I need to upgrade, but my normal commands sudo apt-get update, sudo apt-get upgrade and sudo apt-get dist-upgrade don't seem to have changed the nginx version.

First, I'm wondering if upgrading nginx to the latest version like this is even something I should be looking to do (instead of say, starting with a brand new Forge server). The one huge caveat here is that I am running PHP 5.6 and need to be able to do this for some legacy code (I know, I know that's bad - an upgrade is in process).

Second, I'm wondering if someone might be able to point me in the right direction on how I could undertake this upgrade.

Thanks in advance!

0 likes
6 replies
bobbybouwmann's avatar

In general, upgrading nginx can be done like so

sudo apt-get install --only-upgrade nginx

So the reason it might not update anything is because you're running on an older server as well since you use PHP 5.6. So what ubuntu version do you run?

It's recommended to update to a newer ubuntu version as well. In most cases, it's easier to spin up a new server. Deploy your application to the new server and switch your DNS to the new server.

1 like
intrepidws's avatar

Thanks for your help @bobbybouwmann, I really appreciate it.

The server is running 18.04.

Am I reading your message correctly - I could run the command that you provided and it might actually do not because of the old PHP version?

bobbybouwmann's avatar

It might not update because of an older OS version. However, 18.04 should be good enough and should be supported until the latest version.

Just run it and see what happens ;)

intrepidws's avatar

This is what it returns when run:

nginx is already the newest version (1.15.8-0+bionic0).

It sounds like perhaps I'm running into the problem you described? Is there some way to force a more recent version? Or perhaps change the repository version of nginx?

intrepidws's avatar
intrepidws
OP
Best Answer
Level 5

Thanks for your help @bobbybouwmann , I appreciate it.

I was able to figure this out by following the instructions here:

https://www.linuxbabe.com/ubuntu/install-nginx-latest-version-ubuntu-18-04

For anyone else looking to do this same thing, a few notes:

  • The nginx installation process created a file that I had to delete (/etc/nginx/conf.d/default.conf)
  • I didn't need to do anything in the "Setting the Nginx Process User" section or any of the sections after that in the tutorial
bobbybouwmann's avatar

Very odd that you needed to deleted the config file... Anyway, glad you fixed it!

Please or to participate in this conversation.