Find the answer to your Linux question:
Results 1 to 5 of 5
I just installed a Debian server. I've got everything just about ready to go but I cannot figure out how to password protect the phpmyadmin page. I want to password ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Enthusiast flipjargendy's Avatar
    Join Date
    Aug 2004
    Location
    Xanadu, Titan, Saturn
    Posts
    612

    Question Password protect phpmyadmin altogether


    I just installed a Debian server. I've got everything just about ready to go but I cannot figure out how to password protect the phpmyadmin page. I want to password protect it completely so that users who visit my site are not even brought into the login page.

    There is no actual directory but when I type in phpmyadmin I am brought to the login page.

    I have used my Apache2.conf... since I have access to it I see no need to use .htacess. I have completed the necessary steps to password protect a directory but since phpmyadmin isn't actually a directory or even a file in my html directories, it isn't working properly. This is my assumption. Please tell me if I am going about this the correct way.

    Thanks
    Running Linux Since 2001
    Registered Linux User #430868 - Since 91206

  2. #2
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    it is serving from a folder on your computer, and apache knows where that folder is. if you installed from apt then check /etc/apache2/sites-enabled and check your conf files there and see if you have one for phpmyadmin. that will help you to find out where to use the .htaccess file.

  3. #3
    Linux Enthusiast flipjargendy's Avatar
    Join Date
    Aug 2004
    Location
    Xanadu, Titan, Saturn
    Posts
    612

    No go...

    I looked in sites-enable and sites-available but did not see anything for phpmyadmin or mysql. Any other ideas?

    Would it be bad to go about it this way?

    Create a symbolic link to wherever http://domain.com/phpmyadmin leads and then password protect it as a file or directory?
    Running Linux Since 2001
    Registered Linux User #430868 - Since 91206

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    if apache is already serving phpmyadmin then it is either symlinked already or there is a conf file somehere that references it, or the phpmyadmin folder is in the doc root of your apache, so creating another symlink would be double work and probably counteraffective.

  6. #5
    Linux Enthusiast flipjargendy's Avatar
    Join Date
    Aug 2004
    Location
    Xanadu, Titan, Saturn
    Posts
    612

    Lightbulb [solved]

    I found where to change the directory and have succesfully have done so. Now the symbolic link I created is password protected and leads to phpmyadmin. However, the new alias address is unprotected.

    Thanks for the help.

    Here is my solution for anyone trying figure this out. I could not find one guide that mentioned how to do this the correct way.

    SOLUTION:
    1. The file that determines what the phpmyadmin web address will be is /etc/phpmyadmin/apache.conf and all you need to do is comment out the line that says:
      Code:
      Alias /phpmyadmin /usr/share/phpmyadmin
    2. Now that there is no link to phpmyadmin from the web you must create a symbolic link. Goto the directory you wish to have phpmyadmin accessed from and type:
      Code:
      ln -s /urs/share/phpmyadmin/ phpmyadmin
      This creates a link to /usr/share/phpmyadmin and anything that you do to the link /phpmyadmin will effect the actual directory. So don't delete anything inside phpmyadmin unless you mean it!
    Running Linux Since 2001
    Registered Linux User #430868 - Since 91206

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •