Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

apache problem

  • 22-04-2008 01:56PM
    #1
    Registered Users, Registered Users 2 Posts: 26,449 ✭✭✭✭


    i'm having a problem with apache and some perl scripts i'm trying to run.

    i had my website running under apache on a solaris 8 machine and i'm now trying to port it over to a suse linux machine.

    all my cgi files display fine and good but there's some pages that eg. index.cgi that calls a perl file inside cgi-bin/scripts/myfile.pl

    i'm viewing my page in firefox with firebug installed (it shows me where errors are occurring) it gives me this error when i click the button to execute this script
    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    
    <html><head>
    
    <title>403 Forbidden</title>
    
    </head><body>
    
    <h1>Forbidden</h1>
    
    <p>You don't have permission to access /cgi-bin/scripts/myfile.pl
    
    on this server.</p>
    
    <hr>
    
    <address>Apache/2.2.8 (Unix) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8e PHP/5.2.5 mod_apreq2-20051231/2.6.0 mod_perl
    
    /2.0.2 Perl/v5.10.0 Server at xxxxx.xxxxx.xx Port 80</address>
    
    </body></html>
    
    that led me to believe there were incorrect permissions on my directory structure which is like the following:
    Mydir
        - cgi-bin
            - scripts
        - html
    
    all directories and files in this structure have permission of drwx-rx-rx or (chmod 755).

    the scripts were working perfectly before moving to the new server.

    anyone know what else could be causing this problem?


Comments

  • Registered Users, Registered Users 2 Posts: 16,287 ✭✭✭✭ntlbell


    Cremo wrote: »
    i'm having a problem with apache and some perl scripts i'm trying to run.

    i had my website running under apache on a solaris 8 machine and i'm now trying to port it over to a suse linux machine.

    all my cgi files display fine and good but there's some pages that eg. index.cgi that calls a perl file inside cgi-bin/scripts/myfile.pl

    i'm viewing my page in firefox with firebug installed (it shows me where errors are occurring) it gives me this error when i click the button to execute this script
    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    
    <html><head>
    
    <title>403 Forbidden</title>
    
    </head><body>
    
    <h1>Forbidden</h1>
    
    <p>You don't have permission to access /cgi-bin/scripts/myfile.pl
    
    on this server.</p>
    
    <hr>
    
    <address>Apache/2.2.8 (Unix) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8e PHP/5.2.5 mod_apreq2-20051231/2.6.0 mod_perl
    
    /2.0.2 Perl/v5.10.0 Server at xxxxx.xxxxx.xx Port 80</address>
    
    </body></html>
    
    that led me to believe there were incorrect permissions on my directory structure which is like the following:
    Mydir
        - cgi-bin
            - scripts
        - html
    
    all directories and files in this structure have permission of drwx-rx-rx or (chmod 755).

    the scripts were working perfectly before moving to the new server.

    anyone know what else could be causing this problem?

    in the same dir if you make a test index.html can you see that?

    What is above Mydir?


  • Registered Users, Registered Users 2 Posts: 26,449 ✭✭✭✭Creamy Goodness


    cannot access a test.html in there after i created one.

    the directory structure is

    /home/neil/Mydir...


  • Registered Users, Registered Users 2 Posts: 7,742 ✭✭✭mneylon


    Check the log files


  • Registered Users, Registered Users 2 Posts: 6,677 ✭✭✭daymobrew


    What is the ScriptAlias setting in httpd.conf? I would expect something like:
    [PHP]ScriptAlias /cgi-bin/ "/home/neil/Mydir/cgi-bin/"
    <Directory "/home/neil/Mydir/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
    </Directory>
    [/PHP]


  • Registered Users, Registered Users 2 Posts: 3,890 ✭✭✭cgarvey


    Like Blacknight says ... log lo lo log logs


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 16,287 ✭✭✭✭ntlbell


    is neil world readable?


Advertisement