Sudo chmod g-w /usr/lib/apache2/modules/mod_authn_google.soĮcho "LoadModule authn_google_module /usr/lib/apache2/modules/mod_authn_google.so" | sudo tee /etc/apache2/mods-available/authn_google.load Sudo chown root:root /usr/lib/apache2/modules/mod_authn_google.so Sudo mv mod_authn_google.so /usr/lib/apache2/modules/ The steps are: (1) go to your Downloads, (2) download the package dba-apa24-mod_authn_google-r22.rpm, (3) extract mod_authn_google.so, (4) place the file in /usr/lib/apache2/modules/, (5) grant appropriate permissions, (6) Create module load file: cd $HOME/Downloads Unfortunately I this module is unavailable within Ubuntu's repository, but we can get it from this repository. Modify the new file by adding the directive " PASSWORD=qwerty, where qwerty is the new login password. Please note that the file name determines the login name! The file name will be used as username while logging-in to your secure website. Sudo chown www-data:www-data /var/www-auth/google_authenticator/user Let's assume the name of this new folder is google_authenticator: sudo mkdir -p /var//var/www-auth/google_authenticator/user In step 4 is described how to generate authentication codes.Ĭreate a new directory under /var/www-auth. google_authenticator file, located in your $HOME directory. Protect PhpMyAdmin URI path via Two Factor Authentication (2FA):įollow steps 1 and 3 from this manual to generate. Now to access PhpMyAdmin's URI you must provide the login name user and its password.Ħ. htaccess file): ĪuthName "The name of the authentication form - type some user and password hints"Įnable the modules and restart Apache2 to apply the new configuration: sudo a2enmod authz_core authz_user authn_file Modify PhpMyAdmin authentication type, through edit /etc/phpmyadmin/nf in this way (or create. If this option is omitted htpasswd command will try to add the new login name to an existing. user is the login name that will be used.htpasswd.phpmyadmin is the name of the file in which the password will be stored. In short the steps are:Ĭreate folder outside of /var/Let's assume the name of this new folder is /var/www-auth: $ sudo mkdir /var/www-auth The package apache2-utils must be installed. More details could be found in this Apache's manual: Authentication and Authorization. Protect PhpMyAdmin URI path via Password authentication Allow Ubuntu Server Access only from specific IP'sĥ.Access remote multiple servers behind NAT.Then PhpMyAdmin should be accessible via the web browser of your local machine on the URL More ideas could be find here: The options -fTN will push the connection in to the background.Then establish SSH connection by a command similar as: ssh -fTN -R 99:localhost:99 This command will create ssh tunnel, where the remote -R port 99 is forwarded to the local port 99 on the localhost ( 127.0.0.1). Access PhpMyAdmin only locally through SSH tunnel Don't forget to open this port into the Firewall.Ĥ. Here is a step-by-step manual: How to run PhpMyAdmin on different port. Restart Apache and you will be able to access PhpMyAdmin through the new URI. To change the URI, within the default configuration, you should edit /etc/phpmyadmin/nf and change the first part ( /phpmyadmin) of this directive: Alias /phpmyadmin /usr/share/phpmyadmin Then you can force all users to use HTTPS. You should use your custom port here.įollow this manual and enable a free certificate from Let's Encrypt.Ĭheck this answer and disable Weak Ciphers. Use HTTPS connection to protect your data from sniffingįirst enable SSL module if it is not enabled: sudo a2enmod ssl. I will explain my ideas and the way how they could be implemented within Apache2.ġ.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |