

Thank you for following along and feel free to check back with us for further updates, take a look at other Ubuntu related posts in our blog or learn more about our award-winning VPS hosting solutions. You may now continue building your website. With that, you now have a server installed and configured with Apache. Now you may begin creating/uploading your web content in the sites directory of Apache. If not enabled, enable it, run: sudo systemctl enable rvice. We are going to use the systemctl command as follows to enable the rvice: sudo systemctl is-enabled rvice. Using AWStats, you can view various stats 404, etc. We must now make directories for the sites that were just configured, site1 and site2. Step 2 Make sure Apache service started on boot. AWStats is a powerful and featureful tool to analyze apache access logs. # It is also possible to configure the loglevel for particularĬustomLog $/access.log combined # However, you must set it for any further virtual host explicitly. # value is not decisive as it is used as a last resort host regardless. Its working from curl localhost but It doesnt work from my instance public IP.
#AWSTATS UBUNTU 20.04 APACHE INSTALL#
Now, we will proceed to install AMP (Apache v2.4, PHP v7.4, and MySQL v8. Ive got my Oracle Cloud instance on ubuntu 20.04 and I set up apache2 server. Method 2: Install LAMP Stack In Single Command. sudo systemctl restart apache2 Now, skip to Testing LAMP Stack.

sudo apt install -y php php-mysql libapache2-mod-php Restart the Apache webserver.

Here, we will install PHP 7.4 on Ubuntu 20.04. To have a PHP support, you would need to install PHP and the PHP extension package for MariaDB/MySQL. For the default virtual host (this file) this Here, we will install PHP 7.4 on Ubuntu 20.04. By default Apache server supports serving of static HTML files only, not PHP. # specifies what hostname must appear in the request's Host: header to In the context of virtual hosts, the ServerName # The ServerName directive sets the request scheme, hostname and port that We will now configure Apache by opening the main configuration file and edit ServerName and ServerAdmin lines accordingly. This image is the default web page when installing Apache on Ubuntu 20.04 Configure Apache (Single Host)
