AuthType Basic: Specify the type of authentication to use.These directives basically work as explained in the next paragraph: Inside this file, you need to add the following content that will help you to add another login screen (basic login security): AuthType Basic However this file doesn't exist in the PHPMyAdmin index directory, so you will need to create it as well with your text editor, with nano the command would be: sudo nano /usr/share/phpmyadmin/.htaccess Save the changes and restart apache once again: sudo systemctl restart apache2ĭoing this, we will able to override directives of apache from a. Inside this file search for the mentioned block and add the AllowOverride All directive: We use nano, so the command to edit would be: sudo nano /etc/phpmyadmin/nf To do this, edit the apache config file of PHPMyAdmin with your favorite editor. In order to add an extra authentication step, we need to add a new directive namely AllowOverride inside the block in the configuration file of PHPMyAdmin. PHPMyAdmin is widely known in the web and this makes it a target of malicious attacks, so it's pretty useful to add an extra security layer (with an extra basic authentication), because as you may know PHPMyAdmin has suffered vulnerabilities in the past. Save changes, then, restart apache with the following command: sudo systemctl restart apache2įinally try to access again at the URL it should be accesible now. Then, append the following line at the end of the file: Include /etc/phpmyadmin/nf As first, edit the apache config file with your favorite editor in the CLI, in our case we use nano, so proceed to edit the file: sudo nano /etc/apache2/nf In case that you try to access PHPMyAdmin with the mentioned URL you will need to do an extra step. If you are unable to access PHPMyAdmin through the browser If you are unable to access the mentioned URL from the browser and you have already restarted apache, please read the next section to solve the issue.Īfter logging in, you should feel familiar with the tool: The password for this has been defined during the installation of MySQL (not PHPMyAdmin) in your server (thing that we didn't do in this tutorial as you had to install MySQL previously). Login as the root user to have access to everything. Enable extensions and test PHPMyAdminĪfter installing PHPMyAdmin you only need to enable the installed extensions of PHP with the following commands: sudo phpenmod mcryptĪnd then restart apache to make the changes available to it: sudo systemctl restart apache2įinally you will be able to access the web interface of PHPMyAdmin through the domain name of your server or IP address and /phpmyadmin as suffix e.g you will see the login page of PHPMyAdmin: After finishing the setup PHPMyAdmin is now installed and almost functional. The first one is the preferred web server, that in our case is apache2:Īs next, create the phpmyadmin database from scratch (initial configuration with the default values as this is our first time installing phpmyadmin):ĭuring this step as well, you will need to define a new password for the phpmyadmin user, but that is totally up to you (save the password somewhere). Install PHPMyAdmin and required PHP extensionsĪs first step, as a good practice update the packages of your system with the following command: sudo apt-get updateĪnd proceed with the installation of the PHPMyAdmin package and the required extensions: sudo apt-get install phpmyadmin php-mbstring php-mcrypt php-gettextĪfter confirm that you need extra space on the disk to install, the setup will start and you will be prompted for some basic details. This means that you have already MySQL installed and you have a root user for it and a password that you know as well. RequirementsĪs previously mentioned, we will assume that you have already installed the LAMP stack installed in your system (Apache, MySQL and PHP). In this article, we'll show you how to install PHPMyAdmin in your Ubuntu 16.04 based server (assuming that you have already the LAMP Stack installed). If you are working in a server without a web hosting control panel, like Plesk, where this tool is already integrated and ready to use, you will need to install PHPMyAdmin by yourself. Whatever the people say, using a graphical interface to manage databases is a lot easier than manipulating everything from the CLI. Although a lot of users don't find the necessity of installing a complex MySQL database manager, because they prefer to use simpler tools, like adminer, there are other that prefer reliable and robust solutions as PHPMyAdmin.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |