I've installed Nginx on Ubuntu 20.04.
I have removed Apache2 following these instructions.
(base) @pop-os:/$ which apache2
(base) @pop-os:/$ whereis apache2
apache2: /etc/apache2
I don't know if this tells me that Apache2 still remains.
I checked Nginx as follows:
(base) pop-os:/etc/apache2$ sudo nginx -t nginx: the configuration
file /etc/nginx/nginx.conf syntax is ok nginx: configuration file
/etc/nginx/nginx.conf test is successful (base) pop-os:/etc/apache2$
sudo systemctl reload nginx
It appears that all is well.
I checked to see which apps were listening on each port using the command
sudo lsof -nP -iTCP -sTCP:LISTEN
I see this output:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
systemd-r 855 systemd-resolve 13u IPv4 26226 0t0 TCP 127.0.0.53:53 (LISTEN)
cupsd 1089 root 6u IPv6 30746 0t0 TCP [::1]:631 (LISTEN)
cupsd 1089 root 7u IPv4 30747 0t0 TCP 127.0.0.1:631 (LISTEN)
mongod 1229 mongodb 11u IPv4 35955 0t0 TCP 127.0.0.1:27017 (LISTEN)
java 1235 root 140u IPv6 38491 0t0 TCP *:8080 (LISTEN)
mysqld 1339 mysql 31u IPv6 37368 0t0 TCP *:33060 (LISTEN)
mysqld 1339 mysql 33u IPv4 35255 0t0 TCP 127.0.0.1:3306 (LISTEN)
postgres 1374 postgres 3u IPv6 36937 0t0 TCP [::1]:5432 (LISTEN)
postgres 1374 postgres 4u IPv4 36951 0t0 TCP 127.0.0.1:5432 (LISTEN)
postgres 1375 postgres 3u IPv6 36949 0t0 TCP [::1]:5433 (LISTEN)
postgres 1375 postgres 4u IPv4 36950 0t0 TCP 127.0.0.1:5433 (LISTEN)
nginx 7374 root 6u IPv4 81554 0t0 TCP *:80 (LISTEN)
nginx 7374 root 7u IPv6 81555 0t0 TCP *:80 (LISTEN)
nginx 19544 www-data 6u IPv4 81554 0t0 TCP *:80 (LISTEN)
nginx 19544 www-data 7u IPv6 81555 0t0 TCP *:80 (LISTEN)
nginx 19545 www-data 6u IPv4 81554 0t0 TCP *:80 (LISTEN)
nginx 19545 www-data 7u IPv6 81555 0t0 TCP *:80 (LISTEN)
nginx 19546 www-data 6u IPv4 81554 0t0 TCP *:80 (LISTEN)
nginx 19546 www-data 7u IPv6 81555 0t0 TCP *:80 (LISTEN)
nginx 19547 www-data 6u IPv4 81554 0t0 TCP *:80 (LISTEN)
nginx 19547 www-data 7u IPv6 81555 0t0 TCP *:80 (LISTEN)
Yet when I enter http://127.0.0.1 in Brave I see the Apache2 Ubuntu Default Page rendered. I expected to see Welcome to Nginx.
Why do I still see the default Apache2 page?