Displaying Indexes
Posted by: infotnm (---.slt.lk)
Date: April 07, 2016 04:34PM

hi everyone,
first of all i must say YES, I'm newbie of PHP programming.

Currently I'm using WAMPSERVER 2.5 to do my assignments. in this edition i can see all the folders and files located in 'WWW' Directory as shown in below picture (please click the link to see picture if not displaying).




I want to use WAMPSERVER 3.0 and i installed it and configured many Virtual-Host.
Virtual-Hosts are working but not showing files inside the folder as above picture. so i have to type location or name of the PHP file that i want to run every time manually by hand on the address bar.

my problem is how can i see indexes inside the Virtual-host folder as shown in WAMP 2.5..

Re: Displaying Indexes
Posted by: RiggsFolly (Moderator)
Date: April 07, 2016 04:47PM

Show you Virtual Host definitions, you have forgotten to add a parameter to them, probably the

- Options Indexes FollowSymLinks MultiViews

See sample of how it should be configured

<VirtualHost *:80>
	ServerName localhost
	DocumentRoot D:/wamp/www
	<Directory  "D:/wamp/www/">
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Require local
	</Directory>
</VirtualHost>


Of course it is all documented in the Manuals, which you are most welcome to read at any time you have questions about Apache, MySQL or PHP see my signature block for links to all relevant manuals.


You will need to add this line to all VH's

---------------------------------------------------------------------------------------------
(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 04/07/2016 04:48PM by RiggsFolly.

Re: Displaying Indexes
Posted by: infotnm (---.slt.lk)
Date: April 08, 2016 01:16PM

Hello There it didn't work for me..



i also tried DocumentRoot without " " mark.

here is my host file and the folder




Re: Displaying Indexes
Posted by: Otomatic (Moderator)
Date: April 08, 2016 01:30PM

Hi,

You need to write an .htaccess file in the root of local sites you want to display indexes.
In this .htaccess file, you write, at least:
Options +Indexes

Note: The name of the file is ".htaccess" (Without quotes) with a dot (.) at the beginning of the name. Notepad++ is able to do that.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Re: Displaying Indexes
Posted by: RiggsFolly (Moderator)
Date: April 08, 2016 01:32PM

If this is a WAMPServer 2.? you may have to change this file also

\wamp64\bin\apache\apache2.4.9\conf\extra\httpd-autoindex.conf

Find this line
Alias /icons/ "c:/Apache24/icons/"

And change to

Alias /icons/ "icons/"

---------------------------------------------------------------------------------------------
(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 1 time(s). Last edit at 04/08/2016 01:33PM by RiggsFolly.

Sorry, only registered users may post in this forum.