localhost not displaying vhosts in win8

Problems with the Windows version of XAMPP, questions, comments, and anything related.

localhost not displaying vhosts in win8

Postby kirwood » 07. May 2013 09:51

Hi,
I have recently taken delivery of a Windows 8, 64bit pc with Apache 1.8.1 and Xampp Control Panel v3.1.03.1.0 installed.
Apache is using ports 80 and 443.
I want to use Apache as a local test server for multiple websites and data bases, each with its own domain name (not sub domains).
In the past (win7 and apache 1.7*) I achieved this using vhosts and I would like to do something similar again.

Typing local host in a browser gives me the 'Welcome to XAMPP for Windows!' notice and I can reach phpmyadmin so I assume apache is running correctly without port clashes. (With win7 apache and skype clashed ports which I resolved through the wampp control panel). I am running skype on this pc but I don't know how to check ports/clashes in win8.

httpd-vhosts is set up so:
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs"
ServerName localhost
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "D:/kim"
ServerName kim

</VirtualHost>
but I am unable to see the site using http://localhost/kim (returns 404). Using kim/ returns 'Welcome to XAMPP for Windows!' page. It is my intention to add other virtualhost/domains when this problem is resolved

Here is the most recent portion of the access log
127.0.0.1 - - [07/May/2013:08:41:27 +0100] "GET /xampp/img/blank.gif HTTP/1.1" 200 43 "http://kim/xampp/head.php" "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0"
127.0.0.1 - - [07/May/2013:08:41:27 +0100] "GET /xampp/img/head-for.gif HTTP/1.1" 200 791 "http://kim/xampp/head.php" "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0"
127.0.0.1 - - [07/May/2013:08:41:27 +0100] "GET /xampp/img/head-windows.gif HTTP/1.1" 200 1362 "http://kim/xampp/head.php" "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0"
127.0.0.1 - - [07/May/2013:08:41:28 +0100] "GET /xampp/xampp.js HTTP/1.1" 200 573 "http://kim/xampp/navi.php" "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0"
127.0.0.1 - - [07/May/2013:08:41:28 +0100] "GET /xampp/img/apachefriends.gif HTTP/1.1" 200 979 "http://kim/xampp/navi.php" "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0"
127.0.0.1 - - [07/May/2013:08:41:28 +0100] "GET /xampp/img/strichel.gif HTTP/1.1" 200 61 "http://kim/xampp/navi.php" "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0"
127.0.0.1 - - [07/May/2013:08:41:28 +0100] "GET /favicon.ico HTTP/1.1" 200 7782 "-" "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0"
127.0.0.1 - - [07/May/2013:08:49:46 +0100] "GET / HTTP/1.1" 302 - "-" "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0"
127.0.0.1 - - [07/May/2013:08:49:46 +0100] "GET /xampp/ HTTP/1.1" 200 594 "-" "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0"
127.0.0.1 - - [07/May/2013:08:49:46 +0100] "GET /xampp/head.php HTTP/1.1" 200 1393 "http://kim/xampp/" "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0"
127.0.0.1 - - [07/May/2013:08:49:46 +0100] "GET /xampp/start.php HTTP/1.1" 200 1067 "http://kim/xampp/" "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0"
127.0.0.1 - - [07/May/2013:08:49:46 +0100] "GET /xampp/navi.php HTTP/1.1" 200 3921 "http://kim/xampp/" "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0"
::1 - - [07/May/2013:09:31:23 +0100] "GET /kim/ HTTP/1.1" 404 1052 "-" "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0"
::1 - - [07/May/2013:09:31:43 +0100] "GET /kim HTTP/1.1" 404 1052 "-" "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0"
127.0.0.1 - - [07/May/2013:09:32:49 +0100] "GET / HTTP/1.1" 302 - "-" "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0"
127.0.0.1 - - [07/May/2013:09:32:49 +0100] "GET /xampp/ HTTP/1.1" 200 594 "-" "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0"
127.0.0.1 - - [07/May/2013:09:32:50 +0100] "GET /xampp/head.php HTTP/1.1" 200 1393 "http://kim/xampp/" "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0"
127.0.0.1 - - [07/May/2013:09:32:50 +0100] "GET /xampp/start.php HTTP/1.1" 200 1067 "http://kim/xampp/" "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0"
127.0.0.1 - - [07/May/2013:09:32:50 +0100] "GET /xampp/navi.php HTTP/1.1" 200 3921 "http://kim/xampp/" "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0"

Here is the most recent portion of the error log. There is reference to 'session cache not configured' butI don't know what that is or how to do it.
[Wed Apr 17 17:10:58.621299 2013] [mpm_winnt:notice] [pid 3084:tid 312] AH00456: Server built: Aug 18 2012 12:41:37
[Wed Apr 17 17:10:58.621299 2013] [core:notice] [pid 3084:tid 312] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Wed Apr 17 17:10:58.622271 2013] [mpm_winnt:notice] [pid 3084:tid 312] AH00418: Parent: Created child process 1320
[Wed Apr 17 17:11:00.160283 2013] [ssl:warn] [pid 1320:tid 316] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed Apr 17 17:11:00.234498 2013] [mpm_winnt:notice] [pid 1320:tid 316] AH00354: Child: Starting 150 worker threads.
[Sat May 04 06:45:32.720360 2013] [core:warn] [pid 5220:tid 308] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat May 04 06:45:33.207640 2013] [ssl:warn] [pid 5220:tid 308] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat May 04 06:45:33.718360 2013] [mpm_winnt:notice] [pid 5220:tid 308] AH00455: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 configured -- resuming normal operations
[Sat May 04 06:45:33.718360 2013] [mpm_winnt:notice] [pid 5220:tid 308] AH00456: Server built: Aug 18 2012 12:41:37
[Sat May 04 06:45:33.718360 2013] [core:notice] [pid 5220:tid 308] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Sat May 04 06:45:33.720316 2013] [mpm_winnt:notice] [pid 5220:tid 308] AH00418: Parent: Created child process 3640
[Sat May 04 06:45:35.332542 2013] [ssl:warn] [pid 3640:tid 240] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat May 04 06:45:35.410667 2013] [mpm_winnt:notice] [pid 3640:tid 240] AH00354: Child: Starting 150 worker threads.
[Sat May 04 06:47:08.331185 2013] [core:warn] [pid 1892:tid 308] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat May 04 06:47:08.798934 2013] [ssl:warn] [pid 1892:tid 308] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat May 04 06:47:08.870223 2013] [mpm_winnt:notice] [pid 1892:tid 308] AH00455: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 configured -- resuming normal operations
[Sat May 04 06:47:08.870223 2013] [mpm_winnt:notice] [pid 1892:tid 308] AH00456: Server built: Aug 18 2012 12:41:37
[Sat May 04 06:47:08.870223 2013] [core:notice] [pid 1892:tid 308] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Sat May 04 06:47:08.872176 2013] [mpm_winnt:notice] [pid 1892:tid 308] AH00418: Parent: Created child process 5988
[Sat May 04 06:47:10.418000 2013] [ssl:warn] [pid 5988:tid 316] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat May 04 06:47:10.504911 2013] [mpm_winnt:notice] [pid 5988:tid 316] AH00354: Child: Starting 150 worker threads.
[Tue May 07 08:05:30.753773 2013] [core:warn] [pid 5156:tid 308] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Tue May 07 08:05:31.215665 2013] [ssl:warn] [pid 5156:tid 308] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue May 07 08:05:31.374837 2013] [mpm_winnt:notice] [pid 5156:tid 308] AH00455: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 configured -- resuming normal operations
[Tue May 07 08:05:31.375815 2013] [mpm_winnt:notice] [pid 5156:tid 308] AH00456: Server built: Aug 18 2012 12:41:37
[Tue May 07 08:05:31.375815 2013] [core:notice] [pid 5156:tid 308] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Tue May 07 08:05:31.379723 2013] [mpm_winnt:notice] [pid 5156:tid 308] AH00418: Parent: Created child process 10968
[Tue May 07 08:05:32.810318 2013] [ssl:warn] [pid 10968:tid 316] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue May 07 08:05:32.885512 2013] [mpm_winnt:notice] [pid 10968:tid 316] AH00354: Child: Starting 150 worker threads.

Thank you for your attention.
David
User avatar
kirwood
 
Posts: 31
Joined: 03. February 2011 12:07
Operating System: Windows 8 64bit

Re: localhost not displaying vhosts in win8

Postby Altrea » 07. May 2013 12:12

Hi David,

Have you configured your Windows HOSTS file to resolve the domain name kim?

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: localhost not displaying vhosts in win8

Postby kirwood » 07. May 2013 13:34

Hi, thanks for the prompt response
This is host file in system 32. However there is also a host file in system 64 which I am unable to configure .Message is ' file already exists do you want to overwrite', answer 'yes', response 'save failed'
127.0.0.1 localhost
127.0.0.1 kim
127.0.0.1 alexpledger
127.0.0.1 counsellor
127.0.0.1 t2c
127.0.0.1 thatched
127.0.0.1 fhhs
127.0.0.1 fhsupport
127.0.0.1 hrs
127.0.0.1 myh
127.0.0.1 yukon
127.0.0.1 css_starter
127.0.0.1 ckmedia
127.0.0.1 phpcs5
127.0.0.1 leadon
Since my last post I modified the httpd-vhosts file
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs"
ServerName localhost
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "D:/kim"
ServerName kim
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "D:/alexpledger"
ServerName alexpledger
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "D:/counsellor"
ServerName counsellor
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "D:/t2c"
ServerName t2c
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "D:/fullhouseHS"
ServerName fhhs
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "D:/tc"
ServerName thatched
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "D:/ckmedia"
ServerName ckmedia
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "D:/lead-on"
ServerName leadon
</VirtualHost>
and something odd has happened.
I can now reach kim/ but none of the others. They all give the 'welcome' page. All I did was close everything, shut down and reboot. This has not worked a second time round so I think it is a coincidence.

Still getting '[Tue May 07 11:09:40.575590 2013] [ssl:warn] [pid 1112:tid 316] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]'
David
User avatar
kirwood
 
Posts: 31
Joined: 03. February 2011 12:07
Operating System: Windows 8 64bit

Re: localhost not displaying vhosts in win8

Postby Altrea » 07. May 2013 14:59

kirwood wrote:I can now reach kim/ but none of the others. They all give the 'welcome' page.

The Vhosts are looking good i think. Maybe there is an index file which redirects to the welcome page?

kirwood wrote:Still getting '[Tue May 07 11:09:40.575590 2013] [ssl:warn] [pid 1112:tid 316] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]'

Session Cache is not configured [hint: SSLSessionCache] sticky post
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: localhost not displaying vhosts in win8

Postby kirwood » 08. May 2013 12:26

Ok, I now have the hosts file saved in X86 an 64 and now I get this when I use kim/ in a browser
Access forbidden!
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

There is an index.php and I have Admin permissions on all the files, I checked.

Any ideas where next?
Thanks for the note on cache.
David
User avatar
kirwood
 
Posts: 31
Joined: 03. February 2011 12:07
Operating System: Windows 8 64bit

Re: localhost not displaying vhosts in win8

Postby Altrea » 08. May 2013 13:01

<Directory> Blocks for the vhosts are missing to define Apache access rules.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: localhost not displaying vhosts in win8

Postby kirwood » 08. May 2013 15:23

How do I do/add that?
User avatar
kirwood
 
Posts: 31
Joined: 03. February 2011 12:07
Operating System: Windows 8 64bit

Re: localhost not displaying vhosts in win8

Postby Altrea » 08. May 2013 17:06

One example:

Code: Select all
<VirtualHost *:80>
    DocumentRoot "D:/kim"
    ServerName kim
    <Directory "D:/kim">
        Require all granted
    </Directory>
</VirtualHost>


You can certainly add some more configuration directives inside your <Directory> block to customize your vhost, like AllowOverride or Options

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: localhost not displaying vhosts in win8

Postby kirwood » 09. May 2013 17:02

Hi,
I have tried all of these, singly and in every combination
AllowOverride
AllowOverride None
AllowOverrideList None
within
<Directory "D:/kim">
Require all granted
</Directory>
and the result is
"Access forbidden!
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected."
Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7
As I said earlier, I have given myself Full Control but maybe it's not me but a browser that needs the permissions or does the browser inherit permissions from the user?

Here is the error log
[Thu May 09 16:33:10.116289 2013] [core:notice] [pid 4128:tid 328] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Thu May 09 16:33:10.119220 2013] [mpm_winnt:notice] [pid 4128:tid 328] AH00418: Parent: Created child process 1320
[Thu May 09 16:33:12.159161 2013] [mpm_winnt:notice] [pid 1320:tid 324] AH00354: Child: Starting 150 worker threads.
[Thu May 09 16:33:14.084855 2013] [authz_core:error] [pid 1320:tid 1792] [client 127.0.0.1:61096] AH01630: client denied by server configuration: D:/kim/
[Thu May 09 16:33:39.794596 2013] [authz_core:error] [pid 1320:tid 1792] [client 127.0.0.1:61097] AH01630: client denied by server configuration: D:/kim/index.php

This is frustrating and I thank you for your patience. Where do we go from here?
David
User avatar
kirwood
 
Posts: 31
Joined: 03. February 2011 12:07
Operating System: Windows 8 64bit

Re: localhost not displaying vhosts in win8

Postby Altrea » 09. May 2013 19:34

Hi David,

AllowOverride just configures if and how many php settings you can override with .htaccess files.
It don't configures which client is allowed to request that vhost, thats what the Require all granted line is for.
But maybe there is already an old access rule syntax denial where the new syntax style doesn't have any effect on.

Try this (old and new syntax combined):
Code: Select all
<Directory "D:/kim">
        Order allow,deny
        Allow from all
        Require all granted   
</Directory>

And remember that you have to restart Apache after changes.

kirwood wrote:As I said earlier, I have given myself Full Control but maybe it's not me but a browser that needs the permissions or does the browser inherit permissions from the user?

It's not a file permission issue of your OS but an ressource request permission issue of Apache.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: localhost not displaying vhosts in win8

Postby Nobbie » 10. May 2013 10:44

Sorry - are you all blind?

but I am unable to see the site using http://localhost/kim (returns 404).


Of course this is wrong, this yields to Server localhost (not to kim!!) and finally yields to c:/xampp/htdocs/kim (and this ends up in 404 *not found*).

You simply have to use http://kim instead (or http://localhost if you want to access localhost).

if http://kim yields to c:/xampp/htdocs as well as http://localhost, simply watch the error.log, it tells you what is going wrong with VirtualHost kim.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: localhost not displaying vhosts in win8

Postby kirwood » 10. May 2013 11:30

Hi Altrea,
Brilliant. That works. I can now use Vservername/ for all the domains.
It's great having someone who knows what they are doing available to help.
Many thanks,
David
User avatar
kirwood
 
Posts: 31
Joined: 03. February 2011 12:07
Operating System: Windows 8 64bit


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 97 guests