I get directory index but there is index.php file

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

I get directory index but there is index.php file

Postby become » 14. September 2008 13:07

hello.

I didn't do nothing. I just run xampp.
When I try to load site locally I get directory index.
But there is a index.php file which xampp don't run.
I put there index.html file and the same.



What happen ?
become
 
Posts: 8
Joined: 05. July 2006 13:50

Postby w4vy » 14. September 2008 16:03

have you filled in the Directory Index ?

e.g :-

<IfModule dir_module>
DirectoryIndex index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.shtml index.phtml
</IfModule>

In your httpd.conf file

regards , w4vy

p.s. If you don't want xampp to show an index of your files and folders then put a - before indexes in the options directive in your httpd.conf file

e.g.

<Directory "N:/xampp/htdocs">
Options -Indexes FollowSymLinks +SymLinksIfOwnerMatch Multiviews Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>

Regards, w4vy
Image
User avatar
w4vy
 
Posts: 153
Joined: 04. June 2008 09:58
Location: England

Postby become » 14. September 2008 16:12

<IfModule dir_module>
DirectoryIndex index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.shtml index.phtml
</IfModule>

<Directory />
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>


it is at httpd.conf
I don't know what happen.
become
 
Posts: 8
Joined: 05. July 2006 13:50

Re: I get directory index but there is index.php file

Postby Nobbie » 14. September 2008 21:48

become wrote:When I try to load site locally I get directory index.


How do you load site locally? Please explain exactly.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Postby become » 16. September 2008 12:12

I have virtuall hosts configured at xampp

for example: artelis.loc
so I write:
http://artelis.loc in the browser
and then I get directory index with list of files...
become
 
Posts: 8
Joined: 05. July 2006 13:50

Postby Nobbie » 16. September 2008 12:54

>I have virtuall hosts configured at xampp

And did you configure the right DirectoryIndex for the DocumentRoot of that virtual host? Probably not...
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Postby become » 26. September 2008 12:08

But as I know I don't have to do this if there is

<IfModule dir_module>
DirectoryIndex index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.shtml index.phtml
</IfModule>

beside on my laptop the same configuration works ok.
strange
become
 
Posts: 8
Joined: 05. July 2006 13:50

Postby become » 30. September 2008 15:48

<Directory />
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

<IfModule dir_module>
DirectoryIndex index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.shtml index.phtml
</IfModule>

NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1>
DocumentRoot d:/@serwisy-www-pp/Adder4/
ServerName adder.loc
</VirtualHost>


-----------

Why when I open in the browser http://adder.loc/
I get list index ?
What is wrong ?
become
 
Posts: 8
Joined: 05. July 2006 13:50

Postby w4vy » 30. September 2008 23:55

I told you already

<Directory />
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>


see the Options line place a minus sign before Indexes so

<Directory />
Options -Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Image
User avatar
w4vy
 
Posts: 153
Joined: 04. June 2008 09:58
Location: England

Postby become » 01. October 2008 19:56

I write - before Indexes but now I get 403 Forbidden error

<Directory />
Options -Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

<IfModule dir_module>
DirectoryIndex index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.shtml index.phtml
</IfModule>

NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1>
DocumentRoot d:/@serwisy-www-pp/Adder4/
ServerName adder.loc
</VirtualHost>
become
 
Posts: 8
Joined: 05. July 2006 13:50

Postby w4vy » 01. October 2008 22:18

Sorry I meant to place the - sign inside your Doc root dir and I imagine it would be the same inside virtual directorys.

<Directory "N:/xampp/htdocs">
Options -Indexes FollowSymLinks +Symlinksifownermatch Includes Multiviews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>

w4vy
Image
User avatar
w4vy
 
Posts: 153
Joined: 04. June 2008 09:58
Location: England

Postby become » 02. October 2008 11:26

it is dosn't work.
I do not know what is going wrong with it.
become
 
Posts: 8
Joined: 05. July 2006 13:50

Postby become » 02. October 2008 13:20

do I have to set options for all directories from virtualhost ?
Becouse when I do this it is going to work.
But I thought that I don't have to do this.
I thought I can set options for "default" directory only

<Directory />
Options -Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
become
 
Posts: 8
Joined: 05. July 2006 13:50

Postby w4vy » 02. October 2008 17:19

take away the - sign on on this bit

<Directory />
Options -Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

and place it here

<Directory "N:/xampp/htdocs">
Options -Indexes FollowSymLinks +Symlinksifownermatch Includes Multiviews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>

And I think you would do the same for the virtual directorys you have set up
Image
User avatar
w4vy
 
Posts: 153
Joined: 04. June 2008 09:58
Location: England


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 112 guests