in reply to permissions...

You look like you have an Apache issue. Specifically the script alias directives in httpd.conf need work. Around line 475 (very roughly but it is a long way into the file) of httpd.conf (/etc/httpd/conf/httpd.conf) you will find (well you can't cause you gotta be root but anyway)

# ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the realname directory are treated as applications and # run by the server when requested rather than as documents sent to th +e client. # The same rules about trailing "/" apply to ScriptAlias directives as + to # Alias. # ScriptAlias /cgi-bin/ "/var/httpd/cgi-bin/" # you need a ScriptAlias for your subdir(s) like this ScriptAlias /cgi-bin/subdir/ "var/httpd/cgi-bin/subdir/"

There is a workaround using AddHandler but it is very insecure as it will allow anything that ends in .pl or .cgi or whatever you set to be executed - regardless of where it is in the dir structure so I'm not going to show you how.

As an aside Apache 1.23 has some significant security issues. Your ISP should go to 1.27

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Replies are listed 'Best First'.
Re: Re: permissions...
by iguanodon (Priest) on Dec 21, 2002 at 15:11 UTC
    I agree that this is an apache issue, and the host admin would have to take care of it. But I disagree that this is the default configuration.

    I've always been able to have just one ScriptAlias directive and scripts run fine in subdirectories. There is no line like # you need a ScriptAlias for your subdir(s) like this in the default httpd.conf that came with the 1.3.27 source.

    Also, the location of httpd.conf and the position of any ScriptAlias directives are system dependent. Is your Apache installation by any chance from an RPM or other third party package?

      This is cut directly from a working Redhat 7.3 box's old Apache 1.23 httpd.conf file (dir locations modified but otherwise stock):

      # # ScriptAlias: This controls which directories contain server scri +pts. # ScriptAliases are essentially the same as Aliases, except that # documents in the realname directory are treated as applications +and # run by the server when requested rather than as documents sent t +o the client. # The same rules about trailing "/" apply to ScriptAlias directive +s as to # Alias. # # ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" ScriptAlias /cgi-bin/ "/home/www/cgi-bin/" # # "/var/www/cgi-bin" should be changed to whatever your ScriptAlia +sed # CGI directory exists, if you have that configured. # <Directory "/var/www/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory>

      Exactly the same stuff is in my current 1.27 conf file (apache built from source). It is also in the 1.27 httpd.conf.default file although it points to the default location (/usr/lib/apache/cgi-bin/)

      The location of httpd.conf in /etc/httpd/conf/httpd.conf is correct for a Redhat 7.2 box. Line number is of course ballpark. In 1.23 it is actually at 750 in my file but I have a couple of hundred module lines....

      With this config I can run cgi's in subdirs of CGI bin proviced that the dir is 755 and script 755 of course. The reason that our respondent has issues will actually probably relate to other directives in the conf file (perhaps CGI is set up via Alias) preventing execution in subdirs but the quickest way to fix the issue should be to specifically allow it in the desired subdir....

      cheers

      tachyon

      s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

      Wow, thanks for all the input guys. I just got this host yesterday morning. I do not know much about his Apache installation. Everything about his server is here:
      http://pjmco.ca/html/packages.html

      I am going to direct him to this page for a better explaination of what is going on, as I won't be able to explain it very well.

      I don't know if it makes any difference, but his hosting is virtual. I searched through his testimonials page to find someone with a subdirectory in the bin. I found one. I pinged their site and we have same ip, so I am assuming that we are on same server. Their extention was .cgi (mine was .pl), so I tried one of my .cgi scripts in a subfolder and nothing...

        With virtual hosting your vitual apache server is configured in a virtual hosts section at the very end of the httpd.conf file:

        #<VirtualHost *> # ServerAdmin webmaster@dummy-host.example.com # DocumentRoot /www/docs/dummy-host.example.com # ServerName dummy-host.example.com # ErrorLog logs/dummy-host.example.com-error_log # CustomLog logs/dummy-host.example.com-access_log common #</VirtualHost>

        Your host needs to stick the appropriate script alias lines in here... The documentation and how to-s are extensive. You could start by reading http://www.apache.org/docs/vhosts/ and http://httpd.apache.org/docs/howto/cgi.html These docs are short and accurate.

        cheers

        tachyon

        s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print