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. You now have phpMyAdmin – one of the best, free web interfaces to manage your MySQL database without the command line.How to install Apache on Ubuntu 20.04 LTS After entering the new username/password, you can then log in with your existing account from earlier. You will be asked for the username and password you just created. It will ask you to enter the password you would like to use for the user. Replace with the username you’d like to use. sudo htpasswd -c /etc/phpmyadmin/.htpasswd htpasswd file and the first user/login for it like this. sudo apt-get install apache2-utilsĬreate the. Install an extra package to help us do this. Now that we’ve told Apache we want to protect phpMyAdmin with a password, we need to create the file to tell Apache what password to accept. sudo nano /usr/share/phpmyadmin/.htaccessĬlose and save the file. Now that overrides/.htaccess files are allowed, we’ll create one to provide the actual security.Ĭreate and edit the file. Now, save and close nf by pressing “ CTRL+O“, then “ ENTER” and finally “ CTRL+X“.Īs before, restart Apache. sudo nano /etc/apache2/conf-available/nfĪdd AllowOverride All inside within the config file. Just edit the file that was placed in Apache’s config directory. htaccess Overridesįirst, allow Apache to accept. We will now secure phpMyAdmin against most attacks. PhpMyAdmin is very easy to install, but it’s a huge target for hackers and malicious people because of it’s popularity. Log in with the root user, using the password you created earlier. The phpMyAdmin interface is now running, and you can access it at the URL below. However, you need to enable mcrypt for Apache. ![]() PhpMyAdmin automatically adds it’s config file to Apache, so it doesn’t require additional configuration.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |