Skip to content

Developing on Ubuntu

Hanne Moa edited this page Oct 27, 2016 · 4 revisions

First get the source, see: https://simplesamlphp.org/docs/stable/simplesamlphp-install-repo

If using apt, you'll also need to install:

  • php-curl
  • composer
  • phpunit

Test-site with apache

You need the following packages:

  • apache2
  • libapache2-mod-php

For the virtual host setup see: https://simplesamlphp.org/docs/stable/simplesamlphp-install#section_6

Chcek that the site is enabled with a2dissite.

Check that the module is enabled: php<versionnumber> should be in the list when running a2dismod.

Check your virtualhost-config with apachectl -S. If you get an error like Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName, fix it like this:

echo "ServerName localhost" | sudo tee /etc/apache2/conf-available/fqdn.conf
sudo a2enconf fqdn
sudo systemctl restart apache2

SSP config

See https://simplesamlphp.org/docs/stable/simplesamlphp-install#section_7

When you start up, make sure that template.auto_reload is true. You need to set template.cache to the path of a directory writable by apache if you set template.auto_reload to false.

Hostname instead of localhost

Either add a hostname to /etc/hosts, append the line starting with 127.0.0.1 or you can set up a local top-domain with dnsmasq: apt install dnsmasq then add a file to /etc/dnsmasq.d/ containing the line address=/YOURFAKETOPDOMAIN/127.0.0.1, then you can skip changing anything in the hosts-file. The latter is nice if you want to run several copies of SimpleSAMLphp in parallell.

Other tools

php-codesniffer for code style conventions (PSR-2 for instance)

Clone this wiki locally