Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I have Perl/CGI web pages that just started giving me back this same web server error on my Windows 2000 server for ALL my perl pages:
HTTP Error 404 404 Not Found The Web server cannot find the file or script you asked for. Please ch +eck the URL to ensure that the path is correct. Please contact the server's administrator if this problem persists.
Please advise why all my CGI pages now have this message on the server? I tried to get a more specific message with the below script and get the EXACT same above message. I know this is a server issue because when I run this locally on my workstation the "Hello World" prints out. Please advise how I can get a more specific error message or advise our Windows 2000 System Administrators where to correct this problem??
use CGI qw(:standard); use CGI::Carp qw(fatalsToBrowser); print "Content-type: text/html\n\n"; print "Hello World";

Replies are listed 'Best First'.
Re: Server error message
by Ovid (Cardinal) on Apr 09, 2003 at 18:10 UTC

    What Web server are you using? That would help us to better answer your question. If you're using Windows 2000, I suspect you are using IIS. If so, go to the Control Panel -> Administrative Tools - > Interet Information Services. On the results panel, right click on the Web site in question and select "Properties". That should tell you most of what you need to know about how your Web site is configured. Also, check your access logs to find out what the real path being accessed is.

    Cheers,
    Ovid

    New address of my CGI Course.
    Silence is Evil (feel free to copy and distribute widely - note copyright text)

      Thanks, Yes we do have IIS on our Windows 2000 Server.
        If you are using IIS then you need to setup a specific virtual directory to the directory with your scripts in. You then need to map the .pl or .cgi extension to the perl interpreter as described in the docs. As you are in Win2000 you can do this via the application configuration button.

        You'll have to then stop and start the server but that should do it. One caveat is that you will have to remove the shebang line from any scripts you write (the first line starting with #!).

        HTH

        SP
Re: Server error message
by vek (Prior) on Apr 09, 2003 at 18:39 UTC
    Check to make sure the files really do exist on the server. Have they been renamed or moved? Has there been any configuration changes on the server that would have changed the docroot?

    -- vek --
      Still no luck with this. Server Admin checked and did find the files in the correct directory. He did check the IIS Results Panel and found same error as I was getting on Web page. The server is actually an NT Server. I assume we should have a cgi-bin or something called "anyword-bin" where Perl is running from? Web Access logs arent giving us any info. Should the administrator check to see if the cgi-bin has been deleted? Please advise what areas he can check or should He reinstall cgi-bin or at least try and find it???
Re: Server error message
by jasonk (Parson) on Apr 09, 2003 at 17:54 UTC

    How much more specific can you get? If the files are still there then the web server is probably looking for them in a different directory than where you are seeing them.


    We're not surrounded, we're in a target-rich environment!
      If that is the case then what needs to be fixed??