Documentation:Web debugging
Web Debugging
Since UGCS is a different environment than you may be used to, you may have some issues getting your code to run in our environment. This page aims to list some of the common issues not touched on elsewhere to make them easier to fix.
Basic Debugging
First, look at your logs in /afs/ugcs/apache-logs/username. The error log will hopefully contain something useful, or it may point you towards other issues here.
mod_security
To help protect against various types of web attacks, we run mod_security. Sometimes its rules can interfere with your normal use. To solve this, a line
SecRuleRemoveById <id>
needs to be added to an Apache configuration file. To find the ID, look at your error log for a line that mentions "ModSecurity: Access Denied". Part of this line will be a field that looks like
[id "xxxxxxx"]
This ID should be substituted in the SecRuleRemoveById line, which will disable it and allow your application to run. If you need more information, consult the mod_security documentation.
Note that you will have to contact a sysadmin to have this line added as mod_security currently doesn't support .htaccess overrides.
pcfg_openfile: unable to check htaccess file
Apache starts at the filesystem root and checks each directory for a .htaccess file. If you have a file named .htaccess in a directory above your web directory that Apache is unable to read, it will fail. This can occur if you have copied a .htaccess file into your home directory, where Apache cannot read it. Rename this file (~/.htaccess to anything other than .htaccess) to make your site work again.