Can't view file listing from My Virtual Hosts
Posted by: jmwright1058 (---.hlrn.qwest.net)
Date: February 23, 2015 11:41PM

Can't view file listing from My Virtual Hosts:

When configured as a project, for example project1 located at c:/wamp/www /project1, if a valid index.php file did not exist here, I could see a directory listing. I could also double click on one of the directories and it would take me there.

If I place a valid index.php file in the location pointed to by VirtualHost definition in http-vhosts.conf file the php code executes as it should. However, if I remove the index.php file from this location, I can't see a file listing here.
Where My Virtual host is located at e:/x/y/project2
It says 'You don't have permission to access e:/x/y/project2

Re: Can't view file listing from My Virtual Hosts
Posted by: jmwright1058 (---.hlrn.qwest.net)
Date: February 23, 2015 11:44PM

Setup Information:
1 - Windows 8.1 Professional - 64 bit

2 - WAMPServer Version 2.5 - 64 bit

3 - Apache Version 2.4.9

4 - PHP Version 5.5.12

4a - phpMyAdmin Version 4.3.10

5 - MySQL Version 5.5.32

6 - WampServer icon is Green

Re: Can't view file listing from My Virtual Hosts
Posted by: jmwright1058 (---.hlrn.qwest.net)
Date: February 24, 2015 12:01AM

Here is my http-vhosts.conf contents:

<VirtualHost *:80>
DocumentRoot "c:/wamp/www"
ServerName localhost
ServerAlias localhost
<Directory "c:/wamp/www">
AllowOverride All
Require local
</Directory>
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "e:/x/y/project2"
ServerName project2
ServerAlias project2
<Directory "e:/x/y/project2">
AllowOverride All
Require local
</Directory>
ErrorLog "e:/x/wamp/logs/project2-error.log"
CustomLog "e:/x/wamp/logs/project2-access.log" common
</VirtualHost>

Re: Can't view file listing from My Virtual Hosts
Posted by: RiggsFolly (---.as43234.net)
Date: February 24, 2015 12:15AM

This is the correct functionality of Apache.

If you want the directory listing add

Options +Indexes to

<VirtualHost *:80>
   DocumentRoot "e:/x/y/project2"
   ServerName project2
   ServerAlias project2
   <Directory "e:/x/y/project2">
      AllowOverride All
      Options Indexes            < --  this required
      Require local
   </Directory>
   ErrorLog "e:/x/wamp/logs/project2-error.log"
   CustomLog "e:/x/wamp/logs/project2-access.log" common
</VirtualHost>


When all else fails, there is always the manual, just as a last resort of course.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-



Edited 2 time(s). Last edit at 02/24/2015 12:16AM by RiggsFolly.

Re: Can't view file listing from My Virtual Hosts
Posted by: jmwright1058 (---.hlrn.qwest.net)
Date: February 24, 2015 12:59AM

Yes, Yes, Thank-you!

You are my savior, RiggsFolly.

Re: Can't view file listing from My Virtual Hosts
Posted by: jmwright1058 (---.hlrn.qwest.net)
Date: February 24, 2015 01:08AM

Oh, your comment about the manual...

I did look at the Apache manual, however, after spending a couple hours, could not find this one, and therefore, really appreciate your help.

The boredom you suffer in helping us newbies is a god-send!

Re: Can't view file listing from My Virtual Hosts
Posted by: jmwright1058 (---.hlrn.qwest.net)
Date: February 24, 2015 01:12AM

Even though I can view and navigate the directory structures, I get the following message in my error.log:

AH01630: client denied by server configuration: C:/Apache24, referer: [project2]

Should I be concerned about this?

Re: Can't view file listing from My Virtual Hosts
Posted by: RiggsFolly (---.as43234.net)
Date: February 24, 2015 10:41AM

Yes.

It means that you have probably left the default examples garbage at the top of the httpd-vhosts.conf, in the file.
That is what is delivered by default by the basic windows Apache install and is an example only.

REMOVE IT.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Sorry, only registered users may post in this forum.