Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 16 of 16
whom are you running the server as? which user? also can you post the directory permission on your cgi-bin dir? and the main cgi file that you have?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Linux User
    Join Date
    May 2003
    Location
    CA
    Posts
    370

    whom are you running the server as? which user?
    also can you post the directory permission on your cgi-bin dir?
    and the main cgi file that you have?
    Fixing Unix is better than working with Windows.
    http://nikhilk.homedns.org/projects/index.html

  2. #12
    Just Joined!
    Join Date
    Jan 2004
    Posts
    93
    I set my public_html as 755. But I also tried 711 and 770. I'm running httpd as apache. And my cgi-bin directories have permission 755.
    and the main cgi file that you have?
    What do you mean by the main cgi file? Do you mean the cgi script that I tested? In the test.cgi, I just put "#!/usr/bin/perl -w" and that's it.

  3. #13
    Linux User
    Join Date
    May 2003
    Location
    CA
    Posts
    370
    you are running the webserver as the user apache...what about the owner:group permissions on the cgi-bin dir and the files in it? can they be run
    by the user apache or by the group to which apache belongs?

    Also can you put the following code for your dir public_html in addition to the ExecCGI option.

    AllowOverride None
    Order allow,deny
    Allow from all
    Fixing Unix is better than working with Windows.
    http://nikhilk.homedns.org/projects/index.html

  4. $spacer_open
    $spacer_close
  5. #14
    Linux User
    Join Date
    May 2003
    Location
    CA
    Posts
    370
    ok...savage_cabbage....i configured a cgi-bin directory in my httpd.conf and it worked for me....
    here is what I did:

    first hash out all the default public_html entries that are present in your httpd.conf file...then add

    Alias /public_html /<doc-root> path/public_html
    then after you define the cgi handler and everythg at the end add:

    <Directory "/<doc-root> path/public_html/cgi-bin">
    AllowOverride None
    Options ExecCGI
    Order allow,deny
    Allow from all
    </Directory>

    this setup worked for me just now, so hopefully it shud work for you too!!
    Fixing Unix is better than working with Windows.
    http://nikhilk.homedns.org/projects/index.html

  6. #15
    Just Joined!
    Join Date
    Jan 2004
    Posts
    93
    What do you mean by <doc-root> path? As I just put this in httpd.conf file, apache doesn't even start. It says:

    Starting httpd: Syntax error on line 400 of /etc/httpd/conf/httpd.conf:
    Alias takes two arguments, a fakename and a realname
    [FAILED]


    Do you mean I should change <doc-root> path to /home/*/? That way it still has the same server error message.

  7. #16
    Just Joined!
    Join Date
    Jan 2004
    Posts
    93
    Ok, I got it figured out eventually. There's nothing wrong with the http.conf file. My original configuration is currect. The problem is the "test.cgi" file is owned by root, not the owner of the public_html folder (in this case "david"). I suppose that Apache can't run .cgi files owned by root in other directories other than the main cgi directory (correct me if I'm wrong).

Page 2 of 2 FirstFirst 1 2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •