

This ensures people reach the right site instead of the default one when they type in . Install the Apache web server with PHP and MariaDB support on your EC2 instance. To install phpMyAdmin on your Ubuntu 18. The default file doesn’t come with a ServerName directive so we’ll have to add and define it by adding this line below the last directive: ServerName Install the phpMyAdmin package from the default Ubuntu repositories with the following command: sudo apt install phpmyadmin The installer will prompt you to choose the web server that should be automatically configured to run phpMyAdmin, choose apache by pressing Space and then Enter. We should have our email in ServerAdmin so users can reach you in case Apache experiences any error: ServerAdmin also want the DocumentRoot directive to point to the directory our site files are hosted on: DocumentRoot /var/www/gci/ Now edit the configuration file: sudo nano gci.conf

( gci.conf is used here to match our subdomain name): sudo cp nf gci.conf Since Apache came with a default VirtualHost file, let’s use that as a base.
Ubuntu install phpmyadmin apache2 download#
Install phpMyAdmin on Ubuntu 22.04 Download phpMyAdmin’s latest version Extract and configure 5. Install the LAMP server Apache Webserver Setup MariaDB server Install PHP and its extension 4. We start this step by going into the configuration files directory: cd /etc/apache2/sites-available/ Steps to install phpMyAdmin on Ubuntu 22.04 Server 1. Setting up the VirtualHost Configuration File Now let’s create a VirtualHost file so it’ll show up when we type in. I'm running this website on an Ubuntu Server server!
Ubuntu install phpmyadmin apache2 code#
Paste the following code in the index.html file: To install these packages, run: sudo apt install php libapache2-mod-php php-mysql. Let’s go into our newly created directory and create one by typing: cd /var/www/gci/ Core PHP packages will automatically be installed as dependencies. Now that we have a directory created for our site, lets have an HTML file in it. We have it named gci here but any name will work, as long as we point to it in the virtual hosts configuration file later. So let’s start by creating a folder for our new website in /var/www/ by running sudo mkdir /var/www/gci/ Today, we’re going to leave the default Apache virtual host configuration pointing to and set up our own at. We can modify its content in /var/We can modify how Apache handles incoming requests and have multiple sites running on the same server by editing its Virtual Hosts file. Creating Your Own Websiteīy default, Apache comes with a basic site (the one that we saw in the previous step) enabled.
