I'm running nginx/1.18.0 (Ubuntu) on my DigitalOcean droplet and I've recently found a need to serve mp4 files but discovered that the --with-http_mp4_module is not built by default. Initially I installed nginx with the package manager but needing mp4s served I decided to upgrade nginx to 1.20.0 and install/build it from source with the mp4 module flag. I followed the following tutorials aiming for no down time as I have few apps running.
I've followed all the steps and ran the
make install but when I run
nginx -v I still see that 1.18.0 is running.
My questions are:
Can I use the package manager to uninstall nginx 1.18.0 and then rerun
make install? Will that erase all my configuration settings? I did notice that the new nginx.conf file is different from the old one.
Is there a graceful way of uninstalling the old version without corrupting the new install files?
Below are some outputs for their respective commands.
ps aux| grep nginx
root 80815 0.0 0.1 79340 3412 ? Ss Aug23 0:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on; www-data 80816 0.0 0.5 79580 11108 ? S Aug23 0:01 nginx: worker process mat 1158781 0.0 0.0 8160 660 pts/0 S+ 00:33 0:00 grep --color=auto nginx
nginx: /usr/bin/nginx /usr/sbin/nginx /usr/lib/nginx /etc/nginx /usr/local/nginx /usr/share/nginx /usr/share/man/man8/nginx.8.gz
sudo systemctl status nginx - It does seem like the new master process is working but I still can't use the Mp4 module.
● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2022-08-23 16:47:54 EDT; 7h ago Docs: man:nginx(8) Process: 80787 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Process: 80813 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Main PID: 80815 (nginx) Tasks: 2 (limit: 2339) Memory: 13.2M CGroup: /system.slice/nginx.service ├─80815 nginx: master process /usr/sbin/nginx -g daemon on; master_process on; └─80816 nginx: worker process
I can provide more info if need be. I've been at it for solid few days and really hoping to get some help so I can move on from this.