jordanwb Posted August 19, 2008 Share Posted August 19, 2008 I was able to get virtual hosts working on newly installed Gentoo on my server. I installed phpmyadmin and ran that webapp-config command to install phpmyadmin to the default virtual host. Now when I point FF to http://192.168.1.130/phpmyadmin I get the login, which is right, but when I click "Go" it sends me to http://localhost/phpmyadmin/index.php?lang=en-utf-8&token=4ff2d56f13ccef9d8359ce4ce910233b which obviously not. Quote Link to comment Share on other sites More sharing options...
JonnoTheDev Posted August 19, 2008 Share Posted August 19, 2008 Set the address in the config.inc.php file in phpmyadmin Quote Link to comment Share on other sites More sharing options...
jordanwb Posted August 19, 2008 Author Share Posted August 19, 2008 Set the address in the config.inc.php file in phpmyadmin There's no variable to set the address. <?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * phpMyAdmin sample configuration, you can use it as base for * manual configuration. For easier setup you can use scripts/setup.php * * All directives are explained in Documentation.html and on phpMyAdmin * wiki <http://wiki.cihar.com>. * * @version $Id: config.sample.inc.php 10142 2007-03-20 10:32:13Z cybot_tm $ */ /* * This is needed for cookie based authentication to encrypt password in * cookie */ $cfg['blowfish_secret'] = 'eu5yt340m54'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ /* * Servers configuration */ $i = 0; /* * First server */ $i++; /* Authentication type */ $cfg['Servers'][$i]['auth_type'] = 'cookie'; /* Server parameters */ $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = false; /* Select mysqli if your server has it */ $cfg['Servers'][$i]['extension'] = 'mysql'; /* User for advanced features */ // $cfg['Servers'][$i]['controluser'] = 'pma'; // $cfg['Servers'][$i]['controlpass'] = 'pmapass'; /* Advanced phpMyAdmin features */ // $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; // $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark'; // $cfg['Servers'][$i]['relation'] = 'pma_relation'; // $cfg['Servers'][$i]['table_info'] = 'pma_table_info'; // $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords'; // $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages'; // $cfg['Servers'][$i]['column_info'] = 'pma_column_info'; // $cfg['Servers'][$i]['history'] = 'pma_history'; // $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords'; /* * End of servers configuration */ /* * Directories for saving/loading files from server */ $cfg['UploadDir'] = ''; $cfg['SaveDir'] = ''; ?> Quote Link to comment Share on other sites More sharing options...
JonnoTheDev Posted August 19, 2008 Share Posted August 19, 2008 $cfg['Servers'][$i]['host'] = 'localhost'; Quote Link to comment Share on other sites More sharing options...
jordanwb Posted August 19, 2008 Author Share Posted August 19, 2008 $cfg['Servers'][$i]['host'] = 'localhost'; I think that's to set the mysql_connect function in PHP. But I'll try it anyways. [Edit] Nope. Still redirects to http://localhost/whatever Quote Link to comment Share on other sites More sharing options...
JonnoTheDev Posted August 20, 2008 Share Posted August 20, 2008 There should be a line to modify: $cfg['PmaAbsoluteUri'] = 'http://www.mydomain.com/phpmyadmin/'; Quote Link to comment Share on other sites More sharing options...
jordanwb Posted August 20, 2008 Author Share Posted August 20, 2008 All right I'll give that a shot. To me that seems like bad style. Quote Link to comment Share on other sites More sharing options...
JonnoTheDev Posted August 20, 2008 Share Posted August 20, 2008 Dont understand what you mean. That is part of the phpmyadmin package. Quote Link to comment Share on other sites More sharing options...
jordanwb Posted August 20, 2008 Author Share Posted August 20, 2008 I mean it's bad style where the package can't figure out where it's located. There are server variables that are populated at runtime. All phpMyAdmin has to do is read those variables and adjust accordingly. Or just make links relative to each other. That would be way easier. Quote Link to comment Share on other sites More sharing options...
jordanwb Posted August 20, 2008 Author Share Posted August 20, 2008 Ok so this is what I put: $cfg['PmaAbsoluteUri'] = 'http://'.$_SERVER['SERVER_NAME'].'/phpmyadmin/'; And it still sends me back to localhost. Even if that url could be wrong it wouldn't send me back to localhost. Quote Link to comment Share on other sites More sharing options...
JonnoTheDev Posted August 20, 2008 Share Posted August 20, 2008 I though you wanted it to remain as an IP address rather than domain name $cfg['PmaAbsoluteUri'] = 'http://192.168.1.130/phpmyadmin'; Quote Link to comment Share on other sites More sharing options...
jordanwb Posted August 20, 2008 Author Share Posted August 20, 2008 I do. But I may be accessing the server by my external IP address as well. Quote Link to comment Share on other sites More sharing options...
JonnoTheDev Posted August 20, 2008 Share Posted August 20, 2008 But that is a private IP. Which means that if you access this externally you must be connected via a VPN hence on the same IP range. What is wrong with localhost? It is just a DNS name for the loopback address 127.0.0.1 meaning mysql is on the same machine as the webserver. Surely it works. The normal method would be to add a public IP address to the server and point a domain name at it. http://www.yourdomain.com/phpmyadmin Place a .htaccess file in the document root for the phpmyadmin application to secure it Quote Link to comment Share on other sites More sharing options...
jordanwb Posted August 20, 2008 Author Share Posted August 20, 2008 But that is a private IP. Which means that if you access this externally you must be connected via a VPN hence on the same IP range. What is wrong with localhost? It is just a DNS name for the loopback address 127.0.0.1 meaning mysql is on the same machine as the webserver. Surely it works. The normal method would be to add a public IP address to the server and point a domain name at it. http://www.yourdomain.com/phpmyadmin Place a .htaccess file in the document root for the phpmyadmin application to secure it I'm cheap and this is a development server. VPN? Ever heard of a NAT router? 192.168.1.130 is my server's internal IP address. All the computers in my house share the same external IP address. Anyways. I uploaded a copy of phpMyAdmin and removed Gentoo's version and I'm not sent back to localhost. Now I have another problem. phpMyadmin says my password is wrong even though it's not. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.