Page 1 of 1

opening "localhost.mytest", but opend localhost.mytest/xampp

PostPosted: 26. April 2015 17:48
by hanpedro
opening "localhost.mytest", but opend "localhost.mytest/xampp".


I typed "localhost.mytest" at the address bar at internet explorer, but opened "localhost.mytest/xampp".

1. httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin webmaster@server2.net
DocumentRoot e:\_web\mytest
ServerName localhost.mytest
ServerAlias http://www.localhost.mytest
</VirtualHost>

2. hosts
127.0.0.1 localhost.mytest

3. httpd.conf
DocumentRoot "E:/apm/xampp/htdocs"
<Directory "E:/apm/xampp/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>

Plaese let me know what am I wrong?
Thanks in advance.

Re: opening "localhost.mytest", but opend localhost.mytest/x

PostPosted: 26. April 2015 19:46
by WilliL
I think, you are redirected by an index.php file in folder "localhost.mytest" to "localhost.mytest/xampp".
Rename or change it.

Re: opening "localhost.mytest", but opend localhost.mytest/x

PostPosted: 26. April 2015 19:56
by Nobbie
What tells error_log?

>ServerAlias http://www.localhost.mytest

This is horribly wrong, why did you prepend "http://"??

Re: opening "localhost.mytest", but opend localhost.mytest/x

PostPosted: 27. April 2015 00:33
by hanpedro
WilliL/ No there is not "redirect code" at an index.php file in folder "localhost.mytest"


Nobbie/
I changed

ServerAlias http://www.localhost.mytest

to

ServerAlias www.localhost.mytest

And there is not "error_log"

There are three log files at "apache/logs"

access.log
error.log
ssl_request.log

Re: opening "localhost.mytest", but opend localhost.mytest/x

PostPosted: 27. April 2015 07:45
by Altrea
Hi,

I bet your vhost is not matching (or not defined) and the redirect is executed by the default XAMPP DocumentRoot index.php.
Did you restart Apache after changing the configuration?

Open your XAMPP control panel Shell and type in the following command to output the virtual host configuration
Code: Select all
httpd -S


And please show us the contents of your Apacje error.log

best wishes,
Altrea

Re: opening "localhost.mytest", but opend localhost.mytest/x

PostPosted: 27. April 2015 17:18
by hanpedro
Altrea/

Thsi is the content of th Error file.


[Tue Apr 28 01:15:21.762185 2015] [ssl:info] [pid 3508:tid 444] AH01914: Configuring server http://www.example.com:443 for SSL protocol
[Tue Apr 28 01:15:21.762185 2015] [ssl:debug] [pid 3508:tid 444] ssl_engine_init.c(389): AH01893: Configuring TLS extension handling
[Tue Apr 28 01:15:21.764242 2015] [ssl:debug] [pid 3508:tid 444] ssl_util_ssl.c(343): AH02412: [www.example.com:443] Cert does not match for name 'www.example.com' [subject: CN=localhost / issuer: CN=localhost / serial: B5C752C98781B503 / notbefore: Nov 10 23:48:47 2009 GMT / notafter: Nov 8 23:48:47 2019 GMT]
[Tue Apr 28 01:15:21.764242 2015] [ssl:warn] [pid 3508:tid 444] AH01909: http://www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Tue Apr 28 01:15:21.764242 2015] [ssl:info] [pid 3508:tid 444] AH02568: Certificate and private key http://www.example.com:443:0 configured from C:/xampp/apache/conf/ssl.crt/server.crt and C:/xampp/apache/conf/ssl.key/server.key
[Tue Apr 28 01:15:21.872192 2015] [ssl:info] [pid 3508:tid 444] AH01914: Configuring server http://www.example.com:443 for SSL protocol
[Tue Apr 28 01:15:21.872192 2015] [ssl:debug] [pid 3508:tid 444] ssl_engine_init.c(389): AH01893: Configuring TLS extension handling
[Tue Apr 28 01:15:21.872192 2015] [ssl:debug] [pid 3508:tid 444] ssl_util_ssl.c(343): AH02412: [www.example.com:443] Cert does not match for name 'www.example.com' [subject: CN=localhost / issuer: CN=localhost / serial: B5C752C98781B503 / notbefore: Nov 10 23:48:47 2009 GMT / notafter: Nov 8 23:48:47 2019 GMT]
[Tue Apr 28 01:15:21.872192 2015] [ssl:warn] [pid 3508:tid 444] AH01909: http://www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Tue Apr 28 01:15:21.872192 2015] [ssl:info] [pid 3508:tid 444] AH02568: Certificate and private key http://www.example.com:443:0 configured from C:/xampp/apache/conf/ssl.crt/server.crt and C:/xampp/apache/conf/ssl.key/server.key
[Tue Apr 28 01:15:22.306239 2015] [ssl:info] [pid 8840:tid 388] AH01914: Configuring server http://www.example.com:443 for SSL protocol
[Tue Apr 28 01:15:22.307239 2015] [ssl:debug] [pid 8840:tid 388] ssl_engine_init.c(389): AH01893: Configuring TLS extension handling
[Tue Apr 28 01:15:22.307239 2015] [ssl:debug] [pid 8840:tid 388] ssl_util_ssl.c(343): AH02412: [www.example.com:443] Cert does not match for name 'www.example.com' [subject: CN=localhost / issuer: CN=localhost / serial: B5C752C98781B503 / notbefore: Nov 10 23:48:47 2009 GMT / notafter: Nov 8 23:48:47 2019 GMT]
[Tue Apr 28 01:15:22.307239 2015] [ssl:warn] [pid 8840:tid 388] AH01909: http://www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Tue Apr 28 01:15:22.307239 2015] [ssl:info] [pid 8840:tid 388] AH02568: Certificate and private key http://www.example.com:443:0 configured from C:/xampp/apache/conf/ssl.crt/server.crt and C:/xampp/apache/conf/ssl.key/server.key
[Tue Apr 28 01:15:22.403245 2015] [ssl:info] [pid 8840:tid 388] AH01914: Configuring server http://www.example.com:443 for SSL protocol
[Tue Apr 28 01:15:22.403245 2015] [ssl:debug] [pid 8840:tid 388] ssl_engine_init.c(389): AH01893: Configuring TLS extension handling
[Tue Apr 28 01:15:22.403245 2015] [ssl:debug] [pid 8840:tid 388] ssl_util_ssl.c(343): AH02412: [www.example.com:443] Cert does not match for name 'www.example.com' [subject: CN=localhost / issuer: CN=localhost / serial: B5C752C98781B503 / notbefore: Nov 10 23:48:47 2009 GMT / notafter: Nov 8 23:48:47 2019 GMT]
[Tue Apr 28 01:15:22.403245 2015] [ssl:warn] [pid 8840:tid 388] AH01909: http://www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Tue Apr 28 01:15:22.403245 2015] [ssl:info] [pid 8840:tid 388] AH02568: Certificate and private key http://www.example.com:443:0 configured from C:/xampp/apache/conf/ssl.crt/server.crt and C:/xampp/apache/conf/ssl.key/server.key
[Tue Apr 28 01:15:22.429264 2015] [proxy:debug] [pid 8840:tid 388] proxy_util.c(1764): AH00924: worker ajp://127.0.0.1:8009/examples shared already initialized
[Tue Apr 28 01:15:22.429264 2015] [proxy:debug] [pid 8840:tid 388] proxy_util.c(1806): AH00926: worker ajp://127.0.0.1:8009/examples local already initialized


And the output of "httpd -S" is,

e:\apm\xampp\apache\bin>httpd -S
VirtualHost configuration:
*:80 is a NameVirtualHost
default server localhost.mytest(E:/apm/xampp/apache/conf/extra/httpd-vhosts.conf:1)
port 80 namevhost localhost.mytest(E:/apm/xampp/apache/conf/extra/httpd-vhosts.conf:1)
alias http://www.localhost.mytest
*:443 http://www.example.com (E:/apm/xampp/apache/conf/extra/httpd-ssl.conf:80)
ServerRoot: "E:/apm/xampp/apache"
Main DocumentRoot: "E:/apm/xampp/htdocs"
Main ErrorLog: "E:/apm/xampp/apache/logs/error.log"
Mutex rewrite-map: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="E:/apm/xampp/apache/logs/" mechanism=default
PidFile: "E:/apm/xampp/apache/logs/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG

Re: opening "localhost.mytest", but opend localhost.mytest/x

PostPosted: 29. April 2015 03:57
by hanpedro
Reinstalled and resolved.