Install/access phpmyadmin with Virtualmin?

Discussion in 'HOWTO-Related Questions' started by fred!head, Apr 21, 2008.

  1. fred!head

    fred!head New Member

    Hi,

    I've logged in as root to virtualmin and installed phpmyadmin which appears to be fine. However, when I log in here:

    http://mydomain.com/phpmyadmin

    I get a 404 error. Any ideas how to debug this problem to get phpmyadmin to work with LAMP? What steps I might be missing?

    Thank you!

    Tim

    PS If it matters, I'm running Ubuntu Gutsy, Apache 2, PHP5, latest MySQL. Thx!
     
  2. falko

    falko Super Moderator Howtoforge Staff

    What's the document root of mydomain.com, and where's phpMyAdmin installed?
     
  3. fred!head

    fred!head New Member

    Not 100% sure

    Hi,

    I'm not 100% sure where these locations are. The phpmyadmin appears to be at both /etc/phpmyadmin and /usr/share/phpmyadmin. The /usr location includes a /scripts folder which is not included in the /etc folder. So I think, in this case, the /usr folder is the true location.

    As for the document root, I'm also unsure. I'm using virtualmin, if that helps. Any ideas how I can find out? This is a generic Ubuntu Gutsy install using your Perfect Server instructions.

    Tim
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Take a look at the Apache configuration in /etc/apache2 to find out about the document root for mydomain.com.
     
  5. fred!head

    fred!head New Member

    Not 100% Sure

    Hi,

    In apache2.conf, in /etc/apache2, is it this line:

    # Include the virtual host configurations:
    Include /etc/apache2/sites-enabled/

    I see an httpd.conf file but it's 0kb. In the /sites-enabled folder, I see .conf file for the three virtual sites I've set up for testing.

    In digging further, the three sites I've set up have their document roots here:

    home/site-name/public_html

    Basically I didn't see in the apache .conf file any phrase like "document root".

    Thx!

    Tim
     
    Last edited: Apr 22, 2008
  6. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    ls -la /etc/apache2/sites-enabled/
    ?
     
  7. fred!head

    fred!head New Member

    Here's the output:

    Code:
    drwxr-xr-x 2 root root 4096 2008-04-07 23:48 .                                                                          
    drwxr-xr-x 7 root root 4096 2008-04-08 05:01 ..                                                                         
    lrwxrwxrwx 1 root root   36 2008-03-31 00:42 000-default -> /etc/apache2/sites-available/default                        
    lrwxrwxrwx 1 root root   49 2008-04-07 23:38 site1.com.conf -> /etc/apache2/sites-available/site2.com.conf  
    lrwxrwxrwx 1 root root   48 2008-04-07 22:23 site2.com.conf -> /etc/apache2/sites-available/site2.com.conf    
    lrwxrwxrwx 1 root root   47 2008-04-07 23:48 site3.com.conf -> /etc/apache2/sites-available/site3.com.conf 
    
    I'd love to know where you're headed with all these questions, if there's a series of things I can check rather than one at a time. Thanks, though, for your time so far...

    Tim
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Can you see the document root of mydomain.com in /etc/apache2/sites-available/site2.com.conf or /etc/apache2/sites-available/site3.com.conf?

    BTW, why are both site1.com.conf and site2.com.conf pointing to /etc/apache2/sites-available/site2.com.conf?
     
  9. fred!head

    fred!head New Member

    No. Each site1.conf, site2.conf, and site3.conf file in /sites-available has the correct unique file path to the document root for each site. Only site1.conf has the document root file path of mydomain.com because that's what the VPS is configured for that domain. The other file in the /sites-available folder, default, has a document root directive of /var/www/

    My typo, sorry! I ran the command again and everything is correct.

    Tim
     
  10. falko

    falko Super Moderator Howtoforge Staff

    I think the easiest solution in this case would be to download phpMyAdmin from the phpMyAdmin web site and install it manually in the web site instead of trying to reconfigure the Ubuntu package.
     
  11. fred!head

    fred!head New Member

    If I install it in the main website, will it be available to the other sites? Thx.
     
  12. fred!head

    fred!head New Member

    Also, Falko, what port(s) does phpmyadmin use? As I'm installing these applications, I'm finding that I need to update my iptables file to open ports to make the applications work. I opened 2083 which is the port I currently use with another host but perhaps phpmyadmin uses another default port?

    Thx
     
  13. falko

    falko Super Moderator Howtoforge Staff

    No.

    IT doesn't "use" a port - it's run by your web server, so you must open the port that your web server runs on - usually port 80.
     
  14. fred!head

    fred!head New Member

    I figured out the problem and it was fairly easy. I just added phpmyadmin to the /etc/apache2/mods-available/alias.conf file to map my folder URL to the /user/phpmyadmin folder on the server. Basically I use XAMPP on my computer and so I went through all its apache configuration files to find the reference to phpmyadmin.

    Now I see, however, that the instructions to install PHP that I followed in your tutorial somehow failed to install PHP: when I call up phpmyadmin, I get the code instead of the server processing the PHP. So I'll have to figure out how to install PHP.
     
  15. falko

    falko Super Moderator Howtoforge Staff

    Are you referring to one of the "Perfect Server" setups? In these setups I disable PHP globally so that it can be enabled on a per-site basis by ISPConfig. If you don't use ISPConfig, you can undo the steps to disable PHP.
     
  16. fred!head

    fred!head New Member

    Interesting, that's how it must have happened. Webmin, what I'm using (ISPConfig proved too difficult, cranky), doesn't appear to have such a virtual site by virtual site setting. Or I don't need it.

    Thanks for the clarification.

    Tim
     

Share This Page