![]() ![]() Sudo nano /etc/nginx/site-enabled/nfĪdd the following making changes to the domain name. sudo mv /var/www/html/phpmyadmin /var/www/phpmyadmin then create a virtual host file named nf in the /etc/nginx/conf.d or /etc/nginx/sites-enabled. In this case, move the directory out of the html directory. If you need to use a separate subdomain for you PHPMyAdmin. This will allow PHP to access the directory and read the content OPTIONAL : Create subdomain for your PHPMyAdmin Therefore, we need to change the ownership of the PHPMyAdmin and all related files to be owned by www-dateĬhown -R www-data:www-data /var/www/html/phpmyadmin however, the default owner and group for the PHP engine in Debian is the www-data user. the owner of the PHPMyAdmin directory would be root. Grant php acess to PHPMyAdmin (Fix 403 Forbidden) we need to make sure that the PHP engine can access the directory. index index.php index.html index.htm įastcgi_pass unix:/run/php/ also uncommented the location related to PHP. Notice the added index.php to the index directive. as bellow: vim /etc/nginx/site-enabled/nf Usually, you will a commented lines related to PHP. then, update it with the required settings. Configure nginx to understand PHP (Fix 404 Error)Īt this point, we will edit the default virtual host file for Nginx. In our example, we put the PHPMyAdmin into the default Nginx directory so you can test accessing it using context this is because we didn’t configure the Nginx to understand PHP language or PHP does not have access permission to render the PHP files. because, If you tried to access the path you will get either error messages the 403 Forbidden or 404 not found. In this position, we will enable Nginx PHP support. create_tables.sql Configure Nginx for PHPMyAdmin Thus, we will import the provided SQL script to create a new database tables structure for it. luckily In our case, PHPMyAdmin uses a database. It’s important to realize, that most applications require a meta-data structure that could be file-based or stored in a database. Then save and exit the file Second: Create meta-data Tables Should be similar to the following $cfg = 'c3rDAfiWsVXDRQi1f/HfTM[HBda7n[HU' $cfg = '' / YOU MUST FILL IN THIS FOR COOKIE AUTH! */ then update the line that contain the variable ‘blowfish_secret’. You can type whatever random letters you think of or just generate the whole line using the Generate blowfish secret. In addition, the required length of the string must be 32 chars long. This is key is required for the default cookie-based authentication to encrypt passwords in the browser cookies. Import meta-data database scription required for PHPMyAdmin to function.Enter the database connection setting to the database.Configure Authintecation cookies settings by adding the blowfish secret key.In order to start configuration, we will copy the sample configuration file or rename it to config.php. Move the phpMyAdmin directory to the default Nginx html directory /var//var/www/html/phpMyAdmin Configure PHPMyAdmin. To get the latest version of the software, it’s strongly recommended to visit their website and download it.Įxtract phpMyAdmin archive sudo tar -zxvf phpMyAdmin-5.0. It’s mandatory to have Nginx, PHP, and MySQL installed to be able to continue. Check this article on how to install the latest PHP version on Debian. To install PHPMyAdmin required packages in Debian 10. Database connection (php-mysql) to connect to database connection.openssl (openssl) Needed for default authentication ( using cookies ), also If you want to enable reCAPTCHA.GD2 (php-gd) to display inline thumbnails of JPEGs (“image/jpeg: inline”). ![]() curl (php-curl) To support displaying phpMyAdmin’s latest version, you need to.allows import of XML and Open Document Spreadsheet files. phpseclib (php-phpseclib) The PHP Secure Communications Library.Zip (php-zip) allow uploading of ZIP files to PHPMyAdmin.mbstring (php-mbstring) to improve the performance.Standard PHP Library (php-common) like ( SPL extension, hash ).It requires PHP 7.1+ to work properly in addition to a few other PHP libraries. Here, this article assumes that you have a Debian 10 machine with Nginx v1.14 and MariaDB v15 or later versions installed. So, in this article, we will discuss how to install PHPMyAdmin and service it through Nginx using a Debian 10 machine. PHPMyAdmin is an essential tool to access their MySQL database without exposing the database ports to the world. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |