You are not logged in.

#1 2011-09-10 14:01:14

tomf
Member
Registered: 2011-09-10
Posts: 3

[SOLVED]Apache refusing to server index.php by default

Hi I've followed https://wiki.archlinux.org/index.php/LAMP and set up a working LAMP environment. phpinfo(); ran fine from the url localhost/test.php

I've now added index.php to the DirectoyIndex option in my httpd.conf restarted the server and added a simple index.php script to /srv/http.

I'd expect this to be displayed when visiting just localhost in my browser but instead I'm getting the directory file listing.

I've also got vhosts setup point to a zend application install in another location which seems to have similar issues http://vhostsite doesn't seem to run index.php. If I copy test.php into the public folder and visit http://vhostsite/test.php the phpinfo(); command is displayed.

So short version: apache won't automatically serve index.php when hitting a directory.

Any advice appreciated,

Thanks in advance.

Last edited by tomf (2011-09-11 13:54:20)

Offline

#2 2011-09-10 14:25:50

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Re: [SOLVED]Apache refusing to server index.php by default

tomf wrote:

I've now added index.php to the DirectoyIndex option in my httpd.conf restarted the server and added a simple index.php script to /srv/http.

Double-check the configuration file for typos. wink

It would be easier to help diagnose the problem if you posted your configuration file (at least the relevant sections thereof).


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#3 2011-09-11 11:44:00

tomf
Member
Registered: 2011-09-10
Posts: 3

Re: [SOLVED]Apache refusing to server index.php by default

Ok,

I had a DirectoryIndex line in the vhost overriding the httpd.conf file >.>

Now I can hit index files fine when just visiting the directory but with my zend app it seems to be ignoring my htaccess file. when I go to http://vhost/news it's looking for a news file rather than sending the query string through index.php

Last edited by tomf (2011-09-11 13:05:07)

Offline

#4 2011-09-11 13:53:46

tomf
Member
Registered: 2011-09-10
Posts: 3

Re: [SOLVED]Apache refusing to server index.php by default

I believe I've not solved this by adding

AllowOverride FileInfo

in the directory block of the vhost

Offline

Board footer

Powered by FluxBB