2/17/2023 0 Comments Phpmyadmin ubuntuDisallows access to sensitive file directories.įinally, enable and apply this configuration: $ sudo a2enconf phpmyadmin.Allows access to the folder itself and.Allows access via the /phpmyadmin alias.# Disallow web access to directories that don't need it To allow web access, we need to add an Apache configuration file for phpMyAdmin: $ sudo nano /etc/apache2/conf-available/nfĬopy the configuration below into this file: Alias /phpmyadmin /usr/share/phpmyadmin Once you have your value, copy it into the blowfish_secret field, then save and exit by pressing Ctrl+X, Y, then enter. There are several pages which generate these for you, this one is the one I prefer since it specifies it sources it randomness from /dev/urandom (without going into detail, a good thing). We need a random string 32 characters in length. The blowfish secret is a unique value for your instance of phpMyAdmin used for security purposes. First, copy the sample config file, which we'll use as the basis of our actual one, then, open the config file: $ sudo cp phpmyadmin/ phpmyadmin/įind the line that has $cfg = '' (it should be close to the top). There's a small amount of configuration necessary on phpMyAdmin itself. $ sudo chmod -R 744 phpmyadmin Configuring phpMyAdmin ![]() $ sudo rm phpMyAdmin-4.8.4-all-languages.zipįinally, give ownership of the directory to www-data (the group used by Apache/PHP) and give appropriate permissions: $ sudo chown -R www-data: phpmyadmin Next move the unzipped folder to the traditional phpMyAdmin directory and clean up the original zip file: $ sudo mv phpMyAdmin-4.8.4-all-languages phpmyadmin $ sudo unzip phpMyAdmin-4.8.4-all-languages.zip The easiest way to do this is to use the unzip tool: $ sudo apt install unzip If there's a newer version available than 4.8.4 (you can on their website), then change the link above to suit. Download and InstallĪfter logging into your server, change directory to /usr/share (the traditional place for phpMyAdmin to be stored) and download the files: $ cd /usr/share The latest version of phpMyAdmin at the time of writing is 4.8.4. The server I'm using is running Ubuntu 18.04 (though this tutorial will likely need little to no revision for previous versions), Apache 2.4.37, MySQL 8.0.13, and PHP 7.2.14. Whatever the reason, this tutorial will run you through the basic process of doing so. ![]() You also may just want the latest version for the virtues that come with staying up-to-date. This might be because you're using MySQL 8 and/or PHP 7 and the version provided by Ubuntu's apt repository either won't install or won't function with this setup. Sometimes installing phpMyAdmin manually, as opposed to using apt, is necessary.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |