notifies :reload, "service[php7.0-fpm]"
end
+directory "/srv/dev.openstreetmap.org" do
+ owner "root"
+ group "root"
+ mode 0o755
+end
+
+template "/srv/dev.openstreetmap.org/index.html" do
+ source "dev.html.erb"
+ owner "root"
+ group "root"
+ mode 0o644
+end
+
+ssl_certificate "dev.openstreetmap.org" do
+ domains "dev.openstreetmap.org"
+ notifies :reload, "service[apache2]"
+end
+
+apache_site "dev.openstreetmap.org" do
+ template "apache.dev.erb"
+end
+
package "phppgadmin"
template "/etc/phppgadmin/config.inc.php" do
--- /dev/null
+# DO NOT EDIT - This file is being maintained by Chef
+
+<VirtualHost *:443>
+ ServerName dev.openstreetmap.org
+ ServerAdmin webmaster@openstreetmap.org
+
+ SSLEngine on
+ SSLCertificateFile /etc/ssl/certs/dev.openstreetmap.org.pem
+ SSLCertificateKeyFile /etc/ssl/private/dev.openstreetmap.org.key
+
+ CustomLog /var/log/apache2/dev.openstreetmap.org-access.log combined
+ ErrorLog /var/log/apache2/dev.openstreetmap.org-error.log
+
+ DocumentRoot /srv/dev.openstreetmap.org
+
+ RewriteEngine on
+ RewriteCond %{REQUEST_URI} ^/~([^/]*)(/.*)?$
+ RewriteCond /home/%1/public_html -d
+ RewriteRule ^/~([^/]*)(/.*)?$ https://$1.dev.openstreetmap.org$2 [NS,R=307]
+</VirtualHost>
+
+<VirtualHost *:80>
+ ServerName dev.openstreetmap.org
+ ServerAdmin webmaster@openstreetmap.org
+
+ CustomLog /var/log/apache2/dev.openstreetmap.org-access.log combined
+ ErrorLog /var/log/apache2/dev.openstreetmap.org-error.log
+
+ RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
+ RedirectPermanent / https://dev.openstreetmap.org/
+</VirtualHost>
+
+<Directory /srv/dev.openstreetmap.org>
+ Require all granted
+</Directory>
--- /dev/null
+<html>
+<body>
+You've reached errol, the OpenStreetMap dev server. <br />
+<dl>
+<dt>If you are a user...</dt>
+<dd>You probably want <a href="https://www.openstreetmap.org/">OpenStreetMap</a> itself.</dd>
+<dt>If you are a developer...</dt>
+<dd>You might be interested in <a href="https://apis.dev.openstreetmap.org/">live instances</a> of various <a href="https://wiki.openstreetmap.org/index.php/The_Rails_Port#Installation_on_Debian">Rails Port</a> code branches in <a href="https://svn.openstreetmap.org/sites/rails_port_branches/">SVN</a> for testing clients against.</dd>
+</body>
+</html>