Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > totalnewb: "setup apache to use index.php'

totalnewb: "setup apache to use index.php'
Thread Tools
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Mar 27, 2003, 01:06 PM
 
Hi,

Out of my depth as usual...

I'm trying to set up phpgroupware on my Mac.

According to the guy who wrote the install docs for phpgw, my setup is going pearshaped because:

"ah your getting a dir listing because you haven't added the index page option to
apache to use index.php. I see you've viewed the index.php, and that's what you
should be using, but without the index page config'd many things will not work as
expected."

I imagine another sentance would have been enough to tell me how to do that but the guy is a hard man.

'man apache' in the terminal is not my friend.

Can anyone help me past this please.

Thanks

(I was going to ask why non-Mac users are so grouchy but realised that this would be a very silly question... :-)

Simon
London Uk
     
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status: Offline
Reply With Quote
Mar 27, 2003, 06:46 PM
 
What he is saying is that you need to edit your 'apache.conf' file (the default name on MacOS X is httpd.conf) and tell apache that in addition to index.html, you would like for it to look for index.php.

First you need to open up the file /etc/httpd/httpd.conf with the ability to write that file (it is owned by root, so you need to be an administrator). If you have a version of BBEdit, it can take care of this, otherwise you can use the command 'sudo pico /etc/httpd/httpd.conf' on the command line to edit it.

Once in the file you need to find the line:

DirectoryIndex index.html

and change it to

DirectoryIndex index.html index.php

Then you need to restart apache (turn web sharing off... then on).

That should take care of that problem.
     
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Mar 28, 2003, 03:04 AM
 
Originally posted by larkost:
What he is saying is that you need to edit your 'apache.conf' file (the default name on MacOS X is httpd.conf) and tell apache that in addition to index.html, you would like for it to look for index.php.

First you need to open up the file /etc/httpd/httpd.conf with the ability to write that file (it is owned by root, so you need to be an administrator). If you have a version of BBEdit, it can take care of this, otherwise you can use the command 'sudo pico /etc/httpd/httpd.conf' on the command line to edit it.

Once in the file you need to find the line:

DirectoryIndex index.html

and change it to

DirectoryIndex index.html index.php

Then you need to restart apache (turn web sharing off... then on).

That should take care of that problem.
larkost,

That's fantastic! Thanks for the info.

Am I right in thinking that there are potentially numerous httpd.conf files and each one affects any folders below it? The one I am looking for is presumably in the 'webserver' folder or the 'documents' folder under that?

Many thanks

Simon
     
Dedicated MacNNer
Join Date: May 2002
Location: UK
Status: Offline
Reply With Quote
Mar 28, 2003, 07:40 AM
 
Originally posted by simonmartin:
Am I right in thinking that there are potentially numerous httpd.conf files and each one affects any folders below it? The one I am looking for is presumably in the 'webserver' folder or the 'documents' folder under that?
No, you are wrong in thinking this! There is one file in a folder which is hidden to the Finder, /etc/httpd/httpd.conf

There may be other files in there such as /etc/httpd/httpd.conf.old or /etc/httpd/httpd.conf.applesaved, which are backups creaated by software updates and the like.

It is possible to change the DirectoryIndex value for each folder, using .htacess files. You can find out how here

-mrwalker
     
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Mar 28, 2003, 08:30 AM
 
Originally posted by mrwalker:
No, you are wrong in thinking this! There is one file in a folder which is hidden to the Finder, /etc/httpd/httpd.conf

There may be other files in there such as /etc/httpd/httpd.conf.old or /etc/httpd/httpd.conf.applesaved, which are backups creaated by software updates and the like.

It is possible to change the DirectoryIndex value for each folder, using .htacess files. You can find out how here

-mrwalker
mrwalker,

Thanks for that, I found the file in fact.

Any experience with phpgroupware? I started another thread and would love some help...

Thanks

Simon
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:57 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2