Page 1 of 1

I get directory index but there is index.php file

PostPosted: 14. September 2008 13:07
by become
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 ?

PostPosted: 14. September 2008 16:03
by w4vy
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

PostPosted: 14. September 2008 16:12
by become
<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.

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

PostPosted: 14. September 2008 21:48
by Nobbie
become wrote:When I try to load site locally I get directory index.


How do you load site locally? Please explain exactly.

PostPosted: 16. September 2008 12:12
by become
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...

PostPosted: 16. September 2008 12:54
by Nobbie
>I have virtuall hosts configured at xampp

And did you configure the right DirectoryIndex for the DocumentRoot of that virtual host? Probably not...

PostPosted: 26. September 2008 12:08
by become
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

PostPosted: 30. September 2008 15:48
by become
<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 ?

PostPosted: 30. September 2008 23:55
by w4vy
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>

PostPosted: 01. October 2008 19:56
by become
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>

PostPosted: 01. October 2008 22:18
by w4vy
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

PostPosted: 02. October 2008 11:26
by become
it is dosn't work.
I do not know what is going wrong with it.

PostPosted: 02. October 2008 13:20
by become
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>

PostPosted: 02. October 2008 17:19
by w4vy
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