...@...:~ $ sudo apache2 -v bash: httpd: command not found... ...@...:~$ sudo nginx -v bash: nginx: command not found...
...@...:~$ sudo apt install nginx
...@...:~ $ sudo systemctl enable nginx
...@...:~ $ sudo systemctl start nginx
...@...:~ $ sudo systemctl status nginx ● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset:> Active: active (running) since Wed 2022-03-02 08:50:54 CET; 2 days ago Docs: man:nginx(8)
...@...:~ $ sudo netstat -tulpn | grep nginx tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1671/nginx: master tcp6 0 0 :::80 :::* LISTEN 1671/nginx: master
server { listen 8080 default_server; listen [::]:8080 default_server; server_name _; root /usr/share/nginx/html; }
Listen 8080;
...@...:~ $ sudo nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
...@...:~ $ sudo systemctl restart nginx
...@...:~ $ sudo netstat -tulpn | grep nginx tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 1671/nginx: master tcp6 0 0 :::8080 :::* LISTEN 1671/nginx: master
...@...:~ $ sudo apt install apache2
...@...:~ $ sudo systemctl enable apache2
...@...:~ $ sudo systemctl start apache2
...@...:~ $ sudo systemctl status apache2 ● apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2019-06-06 14:36:06 IST; 10s ago Docs: https://httpd.apache.org/docs/2.4/
...@...:~ $ sudo netstat -tulpn | grep apache tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1671/apache2: master tcp6 0 0 :::80 :::* LISTEN 1671/apache2: master