Apache
From UGCS
(Difference between revisions)
(New page: UGCS uses Apache2 to do our webserving. However, we have a number of customizations to make it work nicely with AFS etc. =Basic info= * Currently www.ugcs.caltech.edu is a CNAME for pose...) |
(→Scripts) |
||
| Line 6: | Line 6: | ||
=Scripts= | =Scripts= | ||
| + | Scripting on UGCS is run through a series of wrappers and some apache configuration. The apache configuration re-writes requests for ~/cgi-bin and ~/*.php to the appropriate wrapper scripts. There is a bit of messiness in the configuration to make sure that the file exists (and is accessable) before it gets rewritten to avoid information leakage. See /etc/apache2/site-parts/ugcs-homedirs for the scripts | ||
| + | The wrapper scripts are /usr/local/sbin/(php,cgi)-wrapper. php-wrapper2 is for virtual hosts. They are perl scripts that get the correct tokens before running the scripts. | ||
=Virtual hosts= | =Virtual hosts= | ||
[[Category:Sysadmin_Documentation]] | [[Category:Sysadmin_Documentation]] | ||
Revision as of 23:34, 21 September 2008
UGCS uses Apache2 to do our webserving. However, we have a number of customizations to make it work nicely with AFS etc.
Basic info
- Currently www.ugcs.caltech.edu is a CNAME for poseidon. Poseidon runs apache2 and is the main webserver
- Logs are sent to charon via syslog-ng. syslog:local1 (/var/log/ugcs/poseidon/local1.log) is used for errors, and syslog:local2 (/var/log/ugcs/poseidon/local2.log) is used for access logs. The messages go through wrapper scripts in /usr/local/sbin which also try to determine what user the message was for, and put it in their appropriate folder in /afs/.ugcs/apache-logs. See also Logging
Scripts
Scripting on UGCS is run through a series of wrappers and some apache configuration. The apache configuration re-writes requests for ~/cgi-bin and ~/*.php to the appropriate wrapper scripts. There is a bit of messiness in the configuration to make sure that the file exists (and is accessable) before it gets rewritten to avoid information leakage. See /etc/apache2/site-parts/ugcs-homedirs for the scripts
The wrapper scripts are /usr/local/sbin/(php,cgi)-wrapper. php-wrapper2 is for virtual hosts. They are perl scripts that get the correct tokens before running the scripts.