Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where is the server error log?

Status
Not open for further replies.

ceimon

Programmer
Sep 25, 2002
14
0
0
US
I'm trying to run a cgi script and keep getting the following error message in my browser:

--------------------------------------------------------
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@site.com 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.

---------------------------------------------------------

However, I do not know where to find the server error log. Please help!
 
ceimon,

It depends on your web hosting software, your virtual server, and (to some degree) on the whims of the admin that set things up.

For example, one host I maintain runs with Apache on a unix system. The error logs are stored in /var/log/apache and there's a separate error log for each virtual host on the system. Thus, if my domain is example.com, my error log is /var/logs/apache/example-errors_log.

In an earlier incarnation, the same server placed all errors into /var/logs/httpd-error.log.

If you have read access to the httpd.conf file, you can search that for the locations you need. For example, the ServerRoot directive defines the base directory for the logs and the ErrorLog directive tells you the file name you're looking for.

If you don't have access to the conf file, then you'll have to ask your admin as nicely as possible. (Bribery sometimes works.)

Again, this is Apache specific. Different web servers handle things differently. If you're using something else, I'd start by searching the online documentation available with the company that that provides your hosting software.

Hope this helps...

-- Lance
 
Add the following "use" in the front section of your perl program. It causes fatal errors in the error log to be sent back to the browser in the form of a returned web page for you to read.

use CGI::Carp qw(fatalsToBrowser);
 
ProfessorSparkie,

Good idea, but don't forget to mention that it may also be a good idea to remove that reference before rolling your script into production. Some folks consider this a security flaw as it allows others to learn more about your server environment than may be considered safe.

I don't personally have an opinion on it one way or the other, however, the community contains certain voices that speak more loudly than I do, so I thought I'd mention it.

Hope this helps...

-- Lance
 
On a few virtual configurations
/var/log/httpd is the symlink that works for me

HTH
--Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top