Server.DefaultDocument=index.php not working on folders?

39 views
Skip to first unread message

Paul Jones

unread,
Nov 12, 2010, 1:38:18 PM11/12/10
to HipHop for PHP Dev
Hi, I'm not sure if I need to do somethign else for this to work

I'm setting up a config file for my HipHop server which includes:
Server.DefaultDocument=index.php

This works fine for http://www.example.com/ which resolves to
http://www.example.com/index.php as expected. My problem is this
doesn't work for folders within the file structure, for example I have
a file at http://www.example.com/tv/index.php but going to
http://www.example.com/tv/ doesn't resolve this.

Have I missed something obvious? I have a lot of folders with
index.php files in them so I'm hoping something can make them all try
index.php should just the folder be called?

Have I just missed an option or something?

Thanks.
Paul.

Maxime Raoust

unread,
Nov 12, 2010, 5:25:29 PM11/12/10
to HipHop for PHP Dev
Hey,

I had a similar problem recently, I found the solution here:
http://groups.google.com/group/hiphop-php-dev/browse_thread/thread/1f905f9f6ee96238/ed4bbe760c1533d4?lnk=gst&q=not+found#ed4bbe760c1533d4

My problem was I was adding absolute paths of the files in my
"files.list" (/home/user/www/index.php and so on) instead of the paths
relative to the doc root (./index.php and so on)

Hope it helps
Max

On Nov 12, 7:38 pm, Paul Jones <pjan...@gmail.com> wrote:
> Hi, I'm not sure if I need to do somethign else for this to work
>
> I'm setting up a config file for my HipHop server which includes:
> Server.DefaultDocument=index.php
>
> This works fine forhttp://www.example.com/which resolves tohttp://www.example.com/index.phpas expected. My problem is this
> doesn't work for folders within the file structure, for example I have
> a file athttp://www.example.com/tv/index.phpbut going tohttp://www.example.com/tv/doesn't resolve this.

Paul Jones

unread,
Nov 15, 2010, 5:06:44 AM11/15/10
to HipHop for PHP Dev
Hi, thanks for that but it hasn't solved it for me.

I made a files list from the document root adding index.php and tv/
index.php both compiled. When running the server I add -v
"Server.DefaultDocument=index.php"
This works fine for http://www.example.com/ which resolves to
http://www.example.com/index.php as expected but going to http://www.example.com/tv/
doesn't go to http://www.example.com/tv/index.php even through
http://www.example.com/tv/index.php works.

Any other advice?

Thanks.
Paul

On Nov 12, 10:25 pm, Maxime Raoust <maximerao...@gmail.com> wrote:
> Hey,
>
> I had a similar problem recently, I found the solution here:http://groups.google.com/group/hiphop-php-dev/browse_thread/thread/1f...
>
> My problem was I was adding absolute paths of the files in my
> "files.list" (/home/user/www/index.php and so on) instead of the paths
> relative to the doc root (./index.php and so on)
>
> Hope it helps
> Max
>
> On Nov 12, 7:38 pm, Paul Jones <pjan...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi, I'm not sure if I need to do somethign else for this to work
>
> > I'm setting up a config file for my HipHop server which includes:
> > Server.DefaultDocument=index.php
>
> > This works fine forhttp://www.example.com/whichresolves tohttp://www.example.com/index.phpasexpected. My problem is this
> > doesn't work for folders within the file structure, for example I have
> > a file athttp://www.example.com/tv/index.phpbutgoing tohttp://www.example.com/tv/doesn'tresolve this.

Scott MacVicar

unread,
Nov 15, 2010, 7:28:58 PM11/15/10
to <hiphop-php-dev@googlegroups.com>
This is something we need to add. The DefaultDocument is for the root but not per-folder.

- Scott

Reply all
Reply to author
Forward
0 new messages