Savannah Frontend Setup
This page describes the configuration needed for savannah's new frontend web server and PHP code.
In 2016, the FSF allocated new hardware for savannah's servers,
kicking off the server migration efforts. The existing server
(which hosts http://savannah.gnu.org) is called frontend
(frontend.savannah.gnu.org
). The new server is currently
called frontend0
(https://frontend0.savannah.gnu.org).
Further reading about savannah's server:
- SavannahArchitecture - overview of the current ('old') setup (i.e. vcs0, mgt0, frontend0, internal0, download0).
- SavannahServices - services/daemons available on savannah's hosts.
- SavannahInternals - Savannah's inner-workings.
- SavannahHosts - Configuration of the new servers (i.e. mgt0, vcs0, frontend0, internal0, download0).
Further reading about savannah's web frontend:
- RunningSavaneLocally - Running savannah's php code locally.
- SavaneInABox - pre-configured Savane virtual machine.
- FrontEnd - Notes about the current frontend setup (git,cvs).
- FrontEndDevelopmentSite - Setting up development sites for savannah.
General information
Savannah's web frontend (i.e. https://savannah.gnu.org)) is written in PHP.
It uses a MySQL database running on internal0
.
The code repository is called 'savane', available at
http://git.savannah.gnu.org/cgit/administration/savane.git and
<git://git.sv.gnu.org/administration/savane.git> (for developers with
write-access: git clone
<USER>@git.sv.gnu.org:/srv/git/administration/savane.git
).
At the time of this writing (September 2016), 'savane' and
Savannah not 'installed' in a standard way (e.g. 'make install').
Instead, files and settings are copied from old servers (e.g. the old
VM of 'frontend.sv.gnu.org' to the new VM 'frontend0'). The MySQL
database is not created from scratch, but is copied from existing
servers (e.g. DB on internal to internal0). The configuration files
(e.g /etc/savane
or the local copy in /home/foobar/projects/savane-etc
)
are copied from existing servers, and tweaked until they 'just work'.
The PHP code runs directly from the cloned repository (i.e. if cloned
into $HOME/projects/savane
, Apache's php configuration should point to
$HOME/projects/savane/frontend/php/
). The 'installation' above does
not touch the PHP part.
The current production website is https://savannah.gnu.org
and is hosted on the 'old' VM (frontend.sv.gnu.org
).
The new production website is https://frontend0.savannah.gnu.org,
and is hosted on the 'new' VM (frontend0.sv.gnu.org
).
The PHP code is in frontend0:/usr/srv/savane
.
The configuration is in frontend0:/etc/savane
.
Apache/PHP Configuration File Location
The environment variable SAVANE_CONF
determines the location of the main
PHP configuration file for savane. It could be set in Apache's configurations
file (frontend0:/etc/apache2/sites-available/sv.inc
) or in an .htaccess
file (/usr/src/savane/frontend/php/.htaccess
) with
SetEnv SAVANE_CONF /etc/savane
The SAVANE_CONF
variable is used in <savane>/frontend/php/include/init.php
to read a hard-coded file named .savane.conf.php
from the specified directory.
init.php
also accepts a fall-back variable SV_LOCAL_INC_PREFIX
, which
is referenced here:
sites-available/sv.nongnu.inc:SetEnv SV_LOCAL_INC_PREFIX /etc/savane/nongnu-conf
.
On current production savannah, none of these are defined for the gnu side
The code in init.php
falls back to:
# go back to default location
if (file_exists('/etc/savane/.savane.conf.php'))
include('/etc/savane/.savane.conf.php');
Content files
Several sections of the displayed HTML content on the savannah website are set by external content files.
See here for further details: http://lists.gnu.org/archive/html/savannah-hackers-public/2016-09/msg00009.html
Savannah's licenses list are also stored in a content file, See this thread for more details: http://lists.gnu.org/archive/html/savannah-hackers-public/2016-09/msg00001.html
Mail messages
Savannah's PHP code runs under apache as www-data
user.
Mail messages sent to www-data
(cron and email errors)
are now aliased to root
(http://lists.gnu.org/archive/html/savannah-hackers-public/2016-05/msg00058.html).