![]() There is no need to change them however, if you run many sites in Linux containers, then we change ports as follows: ![]() Next, edit the /etc/apache2/nf file that include list of ports to listen on Ubuntu box:īy default, the Apache version 2 on Ubuntu Linux will listen on the TCP port 80 (HTTP) and 443 (HTTPS). Step 5 – Test your Apache 2 installation on UbuntuĪt this stage you can use the curl command as follows:Īnother option is to fire a web browser such as Chrome or Firefox and type the URL as follows:Įdit the /etc/apache2/nf file, run:Īt least set ServerName to 127.0.0.1 or actual name such as your-dot-com or server IP address: You can also use the dig command/ host command as follows to find your public IPv4/IPv6 address from the CLI:ĭig +short How To Find My Public IP Address From Command Line On a Linux for more info. Step 4 – Find your Ubuntu 20.04 LTS server IP address See “ How To Configure Firewall with UFW on Ubuntu 20.04 LTS” for more info. Sudo ufw allow 443/tcp comment 'accept HTTPS connections'ġ0.105.28.158 22/tcp ALLOW 192.168.2.0/24Ĥ43/tcp ALLOW Anywhere # accept HTTPS connectionsĨ0/tcp (v6) ALLOW Anywhere (v6) # accept ApacheĤ43/tcp (v6) ALLOW Anywhere (v6) # accept HTTPS connections Sudo ufw allow 80/tcp comment 'accept Apache' Step 3 – Open the Apache port 80 and 443 using UFW firewallĮxecute the following ufw command to port TCP port 80 and 443 for everyone May 05 19:49:41 db-host systemd: Started The Apache HTTP Server. Set the 'ServerName ' directive globally to suppress this message May 05 19: 49: 41 db-host apachectl : AH00558: apache2: Could not reliably determine the server 's fully qualified domain name, using 127.0.1.1. May 05 19: 49: 41 db-host systemd : Starting The Apache HTTP Server. Loaded: loaded (/lib/systemd/system/rvice enabled vendor preset: enabled )Īctive: active (running ) since Tue 19: 49: 41 UTC 7min ago Sudo systemctl reload rvice Find the status of apache2 server Sudo systemctl restart rvice Reload the apache2 server gracefully Sudo systemctl stop rvice Restart the apache2 server Sudo systemctl start rvice Stop the apache2 server To start, stop, restart and then find the service status again use the following commands. ![]() Sudo systemctl enable rvice Managing Apache 2 service on Ubuntu cloud server We are going to use the systemctl command as follows to enable the rvice: Step 2 – Make sure Apache service started on boot In other words, type the following command and press the key: Now that system updated with the latest patches, it is time to install Apache 2 software. To do that, type the following apt command: Make sure your system is up to date and patched. How to install Apache on Ubuntu 20.04 LTS
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |