简体   繁体   中英

how to install two separate phpmyadmin in one server via virtualhost

I'm not asking about two mysqlhost in one phpmyadmin, this is my current configuration. But I'd like to change it to two seperate phpmyadmin, so I can open two url in two tabs like:

xxx.com:8001

xxx.com:8002

at the same time (without session or token error when accessing at the same time) they should link to different mysqlhost.

I'v tried copy two phpmyadmin folders (blowfish_secret changed) and using virtualhost port to link them.

But still got the same token error. Anything I miss?

Thanks!

This is my virtualhost config:

 20 NameVirtualHost *:8005
 21 NameVirtualHost *:8006
 28 <VirtualHost *:8005>
 29     DocumentRoot "/home/users/xx/phpmyadmin"
 30     ErrorLog "logs/phpmyadmin-error_log"
 31 </VirtualHost>
 32 
 33 
 34 <VirtualHost *:8006>
 35     DocumentRoot "/home/users/xx/phpmyadmin2"
 36     ErrorLog "logs/phpmyadmin2-error_log"
 37 </VirtualHost>
 38 
 39 

and my phpadmin config:

$cfg['blowfish_secret'] = 'xx'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
 20 
 21 $cfg['LoginCookieValidity'] = 3600;
 25 $i = 0;
 26 
 30 $i++;
 31 /* Authentication type */
 32 $cfg['Servers'][$i]['verbose'] = 'xx';
 33 $cfg['Servers'][$i]['auth_type'] = 'cookie';
 34 /* Server parameters */
 35 $cfg['Servers'][$i]['host'] = 'xx';
 36 $cfg['Servers'][$i]['connect_type'] = 'tcp';
 37 $cfg['Servers'][$i]['compress'] = false;
 38 /* Select mysql if your server does not have mysqli */
 39 $cfg['Servers'][$i]['extension'] = 'mysqli';
 40 $cfg['Servers'][$i]['AllowNoPassword'] = false;

all the same except the blow_secret.

Thanks

It seems that open two browser ( like chrome and safari ) for the two different phpmyadmin will do the trick.

The reason causes this may be the server auth_type is the cookies for both the site. So, any tabs in one browser will share the same cookie for their host is the same.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM