![]() ![]() If you want to enable password authentication, click on the following link to learn how to set the MySQL root password on Ubuntu 18.04. Note that the MySQL server on Ubuntu use auth_socket plugin to authenticate mysql root and does not need a password for connecting as a root user. (If you want to Install MariaDB, install the mariadb-server package instead of mysql-server package).Īfter the installation has finished, Log in to the MySQL console with the following command: sudo mysql Open the terminal update the package list and install the mysql-server package: sudo apt-get install mysql-server Installing MySQL Server on Ubuntu 18.04 is straightforward. Next, we are going to install MySQL Server as our Database server. You should get information page that displays PHP configuration settings on your Ubuntu 18.04 Server. ![]() Then access the index.php by typing in the web browser (e.g. ![]() To test the PHP installation, create an index.php file under the /var/www/html folder and add the phpinfo() function: The php package will install the "php7.2" as well as "libapache2-mod-php7.2" module that required to work with Ubuntu Apache web server.Īfter the installation is complete, we need to restart the apache server: sudo systemctl restart rvice To install PHP on Ubuntu 18.04, Run: sudo apt-get update PHP is a programming language for developing web applications and essential part of the Ubuntu LAMP Stack. To test virtual host without DNS, create an index.html file inside the DocumentRoot and entry to the hosts file on your local computer, pointing to your Ubuntu server IP address. Of Course we still don't have anything in our DocumentRoot and you also need to configure DNS records to point your domain name to the server IP address. Save the file, enable the new site and reload the Apache web server: sudo a2ensite Īnd now our web server is ready to serve website. sudo vim /etc/apache2/sites-available/Īdd following VirtualHost configuration: ĬustomLog $/access.log combined The /var/First create the DocumentRoot: sudo mkdir /var/extension). For this demonstration, I am going to create a new virtual host for the domain. Every website will have their own configuration and separate Document Root to host website contents.Ĭreating an Apache Virtual Host is a simple task. Virtual Hosting are a way of serving multiple websites from a single server. The /var/HTML, images, CSS, JavaScript and etc.) into the /var/www/html directory.The nf file is the main configuration file which you can find under the /etc/apache2/ directory. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |