Savannah Frontend Setup
This page describes the configuration needed for Savannah new frontend web server and PHP code.
In 2016, the FSF allocated new hardware for Savannah 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 server:
- SavannahArchitecture - overview of the current ('old') setup (i.e. vcs0, mgt0, frontend0, internal0, download0).
- SavannahServices - services/daemons available on Savannah hosts.
- SavannahInternals - Savannah inner-workings.
- SavannahHosts - Configuration of the new servers (i.e. mgt0, vcs0, frontend0, internal0, download0).
Further reading about Savannah web frontend:
- RunningSavaneLocally - Running Savannah PHP code locally.
- FrontEnd - Notes about the current frontend setup.
- FrontEndDevelopmentSite - Setting up development sites for Savannah.
General information
Savannah 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
).
As of September 2016, 'savane' is 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 and configured repository
(i.e. if cloned into $HOME/projects/savane
, Apache PHP configuration
should point to $HOME/projects/savane/frontend/php/
).
config.status --config
output may look like
'--prefix=/home/user/projects/' '--sysconfdir=/home/user/etc'
.
The 'installation' above does not touch the PHP part. When
updating translations is needed, run
cd savane/po; make savane.pot-update update-po all install git reset --hard
Generally, the production machines run the head of the master or i18n branch (see Releasing Savane).
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 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');
"Site-specific" files
Several sections of the displayed HTML on the Savannah website are taken from files in frontend/site-specific/.
Savannah license list is also stored in one of those files.
Mail messages
Savannah 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).