Jump to content

Recommended Posts

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.

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'] = '';

?>

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.

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.

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

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.