Using nginx on Ubuntu

Install nginx

Install PHP

If you are installing the standard version of Ubuntu (without additional PPAs),

Additional PPA

Edit configuration file

Add index.php to the index directive in the server block.

Add (or edit) location block.

Install MariaDB

Enter current password for root (enter for none):

Enter the password currently set for the root user of MariaDB.
No password is set immediately after installation, so press ‘Enter’ key.

Switch to unix_socket authentication [Y/n]

Setting whether to switch to authentication using unix sockets.
Enter ‘n’ to not switch.

Change the root password? [Y/n]

Setting whether to change the password for the root user of MariaDB
Enter ‘y’ to set the password.

Set a password with ‘New password:’ and set the same password again with ‘Re-enter new password:’.

Remove anonymous users? [Y/n]

Setting whether to delete an anonymous user.
Enter ‘y’ to delete as it is not required.

Disallow root login remotely? [Y/n]

Setting to disallow remote login for the root user of MariaDB or not.
Enter ‘y’ to disallow.

Remove test database and access to it? [Y/n]

Set to delete the test database or not.
Enter ‘y’ to delete.

Reload privilege tables now? [Y/n]

Setting whether the user information settings should be reflected.
Enter ‘y’ if you want the settings to be reflected.

Using Basic Authentication

Create an authentication file (.htpasswd) and enter it in the server block configuration file.

Issue SSL certificates with Let’s Encript

Install phpMyAdmin

Install the phpMyAdmin package from the default Ubuntu repository using APT

For the web server selection for installation, don’t select any options and press Enter to continue.
When asked if you want to use dbconfig-common to configure the application database, select . The internal database and phpMyAdmin admin user are set up. phpMyAdmin will ask you to define a new password for the MySQL user in phpMyAdmin, but this is not a password you need to remember, so leave it blank and let phpMyAdmin randomly You can leave it blank and let phpMyAdmin create a random password for you.
When completed, create a symbolic link to the nginx document root directory.

Download and install phpMyAdmin

Generate a blowfish secret and update the following line in the configuration file with the generated string.

コメント

タイトルとURLをコピーしました