OS X beta / Webserver

knasen

Registered
Some newbie questions about the webserver in OS X beta.

1. The server root is Library/Webserver/Documents in default....root=dir Documents?
2. Can I create a dir called cgi-bin in Root? And what permissions?
3. Perl???...Am I supposed to copy the perl folder from the system over to my root=documents?
4. What´s the rootpath in my cgi-script gonna be? #!/usr/bin/perl?
or just #!/perl that´s where I copied it.
5. Is there any way to make the server FTP-accessable?

thanx...I really would appreciate some help
 
I don't know where you would put a cgi-bin to have that active; I could find out if I could find the actual httpd.conf file.

You don't need to copy perl anywhere. It's already installed where it should be. Your scripts should reference #!/usr/bin/perl

The computer can be made FTP-accessable; check the "Sharing" portion of the System Preferences.
 
How can I access this file: httpd.conf file?
And what does it actually do that make me access cgi-bin dirret and where =)

Do I have to compile the script before i can access and configure the script in browser? Now it´s just viewable in text-format =(..perhaps that´s a cgi-bin activation-configuration matter that´s solved by httpd.conf file

Can I make accounts for accessing ftp?

This is so cool..making server and stuffz =)

[Edited by knasen on 10-13-2000 at 03:32 AM]
 
The file you're looking for is /Library/WebServer/Configuration/apache.conf

A search for cgi-bin will quickly find that the dir /cgi-bin/ on your webserver is linked to /Library/WebServer/CGI-Executables, so that's where you'd put your cgis.

Can't make the examples work? They not marked as executable. Unfortunately the only way to change that is through the terminal. (AFAICT)

Launch Terminal
cd /Library/WebServer/CGI-Executables
su (to get root privs, you need the password)
chmod +x printenv

Now you can try http://localhost/cgi-bin/printenv
 
Now we get this Server 500 message:

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
 
[Fri Oct 13 17:40:08 2000] [error] [client 195.198.253.76] Premature end of script headers: /Library/WebServer/CGI-Executables/adminpro/adminpro.cgi

What does this mean? Is it the script path that is wrong?
 
Back
Top