Python CGI can't access server logs

apache
python

#1

Hello. I’m getting a 500 internal server error for my CGI script. I want to read the logs but cannot find them. The internet tells me the default log is located at /var/log/apache2/error.log. I can’t access this folder. How do I view the error logs for a Python CGI script? cgitb.enable() has so far done exactly nothing.


#2

you can access them via terminal, use cat /var/log/apache2/error.log


#3

Ah, yes, that works. But even though I’m getting errors, the log file is empty. Could it possibly be stored somewhere else, or do I need to modify something?

$ sudo cat /var/log/apache2/error.log
$