Http localhost 8080 phpmyadmin1/20/2024 ![]() ![]() In order to access phpMyAdmin via SSH tunnel, you need an SSH client. ![]() TIP: Refer to these instructions to learn how to obtain your private key. Watch the following video to learn how to easily access phpMyAdmin on Windows through an SSH tunnel: In this case, modify the steps below to use ports 81 or 443 respectively instead of port 80 for the tunnel endpoint. Similarly, if you have enabled Varnish (TM) or HTTPS redirection, your stack’s Web server might be accessible on port 81 (Varnish (TM)) or port 443 (SSL). If this port is already in use by another application on your local machine, replace it with any other port number greater than 1024 and modify the steps below accordingly. NOTE: The steps below suggest using port 8888 for the SSH tunnel. IMPORTANT: Before following the steps below, ensure that your Web and database servers are running. This implies that you must be able to connect to your server over SSH in order to access these applications remotely. To access it from a remote system, you must create an SSH tunnel that routes requests to the Web server from 127.0.0.1. Make a symbolic link to /usr/share/phpmyadmin the virtualhost document root.For security reasons, phpMyAdmin is accessible only when using 127.0.0.1 as the hostname. If you have other sites that you need to have access to port 80 and the Listen directive to that Virtualhost.Īlternatively, you could restrict Phpmyadmin to only one specific port by creating a Phpmyadmin version host and use the Listen 99 directive to that virtual host.ĭetails for creating a virtual host for Apache2 can be found here: In most circumstance, disabling the default port 80 isn't necessary. To disable port 80 where you can only have access via port 99, comment out or remove the Listen 80 from the configuration.ĭisabling the default port is a little more detailed This adds port 99 to the available access. # vim: syntax=apache ts=4 sw=4 sts=4 sr noet # have to change the VirtualHost statement in # If you just change the port or add more ports here, you will likely also ![]() With iptables you can do that by this command: sudo iptables -A INPUT -p tcp -m tcp -dport 99 -j ACCEPTĪdding access via port 99 is quick and easyĪdd the port 99 to your Apache2 configuration. If you use UFW you can do that by this command: sudo ufw allow 99/tcp If you want this new VirtualHost to be accessible from the outside don't forget to add port 99 into your firewall's rules. ![]() This step is optional, but otherwise and will provide identical result, so I suppose we do not need that :) Edit /etc/phpmyadmin/nf and comment ( #) the first Alias directive like thath: #Alias /phpmyadmin /usr/share/phpmyadmin a2ensite phpmyadmin will enable the new VirtualHost, described in 2.a2disconf phpmyadmin will disable the default phpMyAdmin's configuration, described in 1.Switch Apache's configuration and restart it. Thus /etc/phpmyadmin/nf will be included only for the current VirtualHost! Instead of this directive you can copy/paste the content of /etc/phpmyadmin/nf in this place.ģ. Include /etc/phpmyadmin/nf this directive includes the default phpMyAdmin's configuration into Apache's configuration. But you can add specific rules here, for example you can Set Up Password Authentication ĭocumentRoot /usr/share/phpmyadmin this directive sets /usr/share/phpmyadmin as directory that forms the main document tree visible from the web, for the current VirtualHost this directive is optional because the access permissions for /usr/share/ are usually set in /etc/apache2/nf. (Usually there have ServerName set on the Server level - in /etc/apache2/nf) ServerName localhost this directive is optional and can be customised according to your needs. defines a VirtualHost which will handle the requests form all interfaces ( *) on port :99. Like says you can put this directive in /etc/apache2/nf or you can leave it here Listen 99 instructs Apache2 to listen on port 99. The content of this file should looks like: Listen 99ĮrrorLog $/ combined Let's call it nf and create it by nano (or you can use your favorite text editor): sudo nano /etc/apache2/sites-available/nf Create new VirtualHost configuration file. This file is a symbolic link to the file /etc/apache2/conf-available/nf, which is a symbolic link to the file /etc/phpmyadmin/nf, which will be used in the next step.Ģ. By default (within Ubuntu 16.04) PhpMyAdmin is included (and enabled) into the Apache's configuration ( for all VirtualHosts!) through this additional configuration file: /etc/apache2/conf-enabled/nf Understanding of the default configuration of PhpMyAdmin. Just to be clear, this is not a setting of PhpMyAdmin, it is a setting of the configuration of Apache2, and we need to create new VirtualHost for this purpose.ġ. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |