r39441 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39440‎ | r39441 | r39442 >
Date:21:27, 15 August 2008
Author:river
Status:old
Tags:
Comment:
add README
Modified paths:
  • /trunk/tools/switchboard2/Makefile.config.example (modified) (history)
  • /trunk/tools/switchboard2/README (added) (history)

Diff [purge]

Index: trunk/tools/switchboard2/README
@@ -0,0 +1,57 @@
 2+ Switchboard
 3+ ===========
 4+
 5+Welcome to switchboard. switchboard is a FastCGI proxy that starts setuid PHP
 6+processes on demand, in a similar manner to Apache suexec. switchboard allows
 7+mass PHP hosting environments to improve security by running PHP scripts as
 8+the owner instead of the web server user, without the overhead (compared to
 9+mod_php) that other solutions like mod_suphp have.
 10+
 11+switchboard has been tested with Sun Java System Web Server 7.0 on Linux and
 12+Solaris, and Apache 2.2.9 on Linux.
 13+
 14+switchboard was written by River Tarnell <river@wikimedia.org> for the Wikimedia
 15+Toolserver <http://toolserver.org/>.
 16+
 17+Installing switchboard
 18+----------------------
 19+
 20+Copy "Makefile.config.example" to "Makefile.config", edit it as appropriate, and
 21+run 'make'. Run 'make install' to install it.
 22+
 23+switchboard requires Boost <http://www.boost.org/> and Apache log4cxx
 24+<http://logging.apache.org/log4cxx/index.html> to build. Only the Boost headers
 25+are required, not the compiled libraries.
 26+
 27+Running switchboard
 28+-------------------
 29+
 30+Configuration files are placed in /etc/switchboard. You will need to create
 31+main.conf and log.conf based on the example files, and edit them for your
 32+environment.
 33+
 34+Configuring the web server
 35+--------------------------
 36+
 37+To use switchboard, you need to configure your web server to send PHP requests
 38+to switchboard. For Apache mod_fastcgi, something like this should work:
 39+
 40+ AddHandler php-fastcgi .php
 41+ Action php-fastcgi /cgi/php
 42+ FastCgiConfig -idle-timeout 300
 43+ FastCgiExternalServer /var/www/cgi/php -host localhost:850 -idle-timeout 300
 44+
 45+For Sun Java System Web Server:
 46+
 47+ Service fn="responder-fastcgi" type="application/x-php" bind-path="localhost:850" reuse-connection="false"
 48+
 49+For other web servers, you will need to determine the correct value of 'server-type'
 50+in main.conf. The difference between them is 'apache' uses the PATH_TRANSLATED
 51+variable to locate the script, while 'sjs' uses SCRIPT_NAME. If you succeed in
 52+using switchboard with another web server, please file a feature request for your
 53+web server, describing how you did it.
 54+
 55+Bugs, feature requests
 56+----------------------
 57+
 58+Please report bugs and feature requests at <https://jira.toolserver.org/browse/SWTCH>.
Index: trunk/tools/switchboard2/Makefile.config.example
@@ -5,16 +5,8 @@
66 CC = cc
77 CXX = CC
88
9 -### Suffix for Boost library names
10 -
11 -# Sun:
12 -BOOSTTAG = -sw-mt
13 -
14 -# gcc:
15 -#BOOSTTAG = -gcc43-mt
16 -
179 ### Compiler flags
18 -# See the note about -library=stlport8 above.
 10+# See the note about -library=stlport4 above.
1911 EXTRA_CFLAGS = -xO3 -g
2012 EXTRA_CXXFLAGS = $(EXTRA_CFLAGS) -library=stlport4
2113

Status & tagging log