Page 1 of 1

can' access phpmyadmin after add proxy setting

PostPosted: 28. March 2014 09:38
by baseball
Dear :

I want to set virtual host in my xampp-win32-1.8.2-4-VC9-installer

1.create C:\xampp\tomcat\wb_webapps

2. C:\xampp\tomcat\conf\ server.xml
<Host name="wb.com.tw" appBase="wb_webapps" unpackWARs="true" autoDeploy="true"/>

3.C:\WINDOWS\system32\drivers\etc\hosts add
192.168.1.14 wb.com.tw

now:
I can link by wb.com.tw:8080
and I can link 192.168.1.14/phpmyadmin

now I don't want use type 8080 when i link:
wb.com.tw:8080 -->wb.com.tw

so
4.conf/server.xml doesn't mark
<Connector port="8009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />



5.C:\xampp\apache\conf\extra\httpd-vhosts.conf add
<VirtualHost *:80>
ServerName wb.com.tw

<Proxy *>
AddDefaultCharset Off
Order deny,allow
Allow from all
</Proxy>

ProxyPass / ajp://wb.com.tw:8009/
ProxyPassReverse / ajp://wb.com.tw:8009/
</VirtualHost>

now, I can link to wb.com.tw:8080 as wb.com.tw
but, I can link 192.168.1.14/phpmyadmin/
it show :
HTTP Status 404 - /phpmyadmin/
type Status report
message /phpmyadmin/
description The requested resource is not available.
Apache Tomcat/7.0.42


SO,How to solve?
thx.

[EDIT by Altrea: moved here from the german only section of this board]

Re: can' access phpmyadmin after add proxy setting

PostPosted: 28. March 2014 15:55
by Nobbie
You did not define a virtualhost for 192.168.1.14, so it might be treated same as wb.com.tw

Re: can' access phpmyadmin after add proxy setting

PostPosted: 31. March 2014 04:10
by baseball
Dear :THX.
I add this to Vhost
<VirtualHost *:80>
DocumentRoot "C:\xampp\htdocs"
ServerName admin99.com.tw
</VirtualHost>

and Hosts add
192.168.1.14 admin99.com.tw
--->this is OK!

BUT, another question is: I want to connect to mysql using java on this machine:
I use String jdbcUrl = "jdbc:mysql://127.0.0.1:3306/wb";
it ok to connect.

but when I use
String jdbcUrl = "jdbc:mysql://192.168.1.14:3306/wb";
it show exception:
xception in thread "main" java.sql.SQLException: Access denied for user 'root'@'wb.com.tw' (using password: YES)

THX

Re: can' access phpmyadmin after add proxy setting

PostPosted: 01. April 2014 05:25
by Altrea
Hi,

Mysql user root is not permitted to login from other hosts than localhost

Best wishes,
Altrea

Re: can' access phpmyadmin after add proxy setting

PostPosted: 03. April 2014 01:05
by baseball
Dear:
Thx for your help!