on 6/27/01 2:02 AM, Sammy Banawan at [EMAIL PROTECTED] wrote:

> on 6/26/01 9:18 PM, Jeff Lowrey at [EMAIL PROTECTED] wrote:
> 
>> > At 9:04 PM -0400 6/26/01, Brad Rice wrote:
>>>> >> >I managed to get Apache up and running and I edited the config file
>>>> >> >to recognize my Sites file as http://localhost/~username
>> > 
>> > Seriously, is this harder than enabling Web Sharing in the Sharing
>> > System Preferences panel?
>> > 
>>>> >> >and use php as a DirectoryIndex.
>> > 
>> > That might be harder.
>> > 
>>>> >> >Now I can't seem to figure out what I need to do to make it
>>>> >> >recognize my cgi-bin as an executable directory. I was reading about
>>>> >> >ScriptAlias but I am not sure if I really need to edit that command
>>>> >> >to get it to work. My scripts are working in the terminal but not in
>>>> >> >the browser.
>>>> >> >
>>>> >> >Can someone advise me what I need to do to get it to run test scripts?
>> > 
>> > What do your web server log files say when you try and run your
>> > script?  Have you checked the faqs for what to do when scripts run
>> > from the terminal, but not the browser?
>> > 
>> > -Jeff Lowrey
>> > 
>> > 
> 
> To get php as a directory index you need to open up /etc/httpd/httpd.conf
> and find the line that says directory index. Do a search for index.html and
> itıll take you to the proper line. Add index.php (or whatever you want to
> call it) to that line and exit the editor. Type Œapachectl restartı and
> there you go. 
> 
> You should automatically have your CGI-Executables directory set up to be
> your cgi-bin. That is, you donıt need to do anything other than direct your
> browser to http://127.0.0.1/cgi-bin/nameofcgi.cgi to get it to work. You
> need to make sure that your permissions are correct (chmod 755
> nameofcgi.cgi) to get them to be accessible. Hope that helps.
> 

I forgot to add that your cgiıs need to be in the
/Library/WebServer/CGI-Executables/ directory to use them unless you change
your httpd.conf file to look elsewhere or execute files in other
directories. Also, you should use http://127.0.0.1/ as your base directory
and put your pages in /Library/WebServer/Documents/ to view them. The
~username directory is for childıs play :) Real servers donıt do that :)

Reply via email to