File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929 name : install_composer
3030
3131 roles :
32+ - role : properties/www
3233 - role : properties/doc
3334 - role : properties/downloads
3435 - role : properties/gtk
Original file line number Diff line number Diff line change @@ -109,14 +109,13 @@ wiki IN CNAME wiki-php-net.ax4z.com.
109109; windows.php.net is configured entirely as a physical host below
110110
111111; www is kind of a big deal
112- www-origin IN CNAME php-web4.php.net.
113112www 300 IN CNAME www-php-net.ax4z.com.
114113
115114;------------ Old hostnames that just get redirected (or retired?)
116115
117- ; these redirect to www.php.net - could just use STAR-php-net.ax4z.com?
118- secure IN CNAME secure -php-net.ax4z.com.
119- static IN CNAME static -php-net.ax4z.com.
116+ ; these redirect to www.php.net
117+ secure IN CNAME STAR -php-net.ax4z.com.
118+ static IN CNAME STAR -php-net.ax4z.com.
120119
121120;------------ MX (mail) records
122121
@@ -204,6 +203,7 @@ shared.internal IN CNAME service2-ams.internal.php.net.
204203qa.internal IN CNAME service2-ams.internal.php.net.
205204talks.internal IN CNAME service2-ams.internal.php.net.
206205people.internal IN CNAME service2-ams.internal.php.net.
206+ www.internal IN CNAME service2-ams.internal.php.net.
207207
208208; Abandoned
209209gtk.internal IN CNAME service2-ams.internal.php.net.
Original file line number Diff line number Diff line change @@ -55,6 +55,9 @@ doc_domain_alias: doc.internal.php.net
5555analytics_domain : analytics.php.net
5656analytics_domain_alias : analytics.internal.php.net
5757
58+ www_domain : www.php.net
59+ www_domain_alias : www.internal.php.net
60+
5861systems_email : systems@php.net
5962master_email : " {{ systems_email }}"
6063
Original file line number Diff line number Diff line change 1+ # This restarts the Apache service
2+ - name : restart apache
3+ service :
4+ name : apache2
5+ state : restarted
6+
7+ - name : reload apache
8+ service :
9+ name : apache2
10+ state : reloaded
Original file line number Diff line number Diff line change 1+ - name : Create local directory to store www content
2+ file :
3+ state : directory
4+ dest : " {{ www_docroot }}/{{ www_domain }}"
5+ mode : " 755"
6+
7+ - name : Copy update-www script to the server
8+ template :
9+ src : templates/update-www
10+ dest : /local/systems/update-www
11+ mode : " 700"
12+
13+ - name : Create a cron job to run every 5 minutes
14+ cron :
15+ name : Run update-www every 5 minutes
16+ minute : " */5"
17+ job : /local/systems/update-www
18+
Original file line number Diff line number Diff line change 1+ # This role sets up the property www.php.net with Apache together with the php module
2+ # It uses self-signed SSL certs
3+
4+ - name : Add Apache config for www.php.net
5+ template :
6+ src : templates/{{ www_config_file }}
7+ dest : " /etc/apache2/sites-available/{{ www_config_file }}"
8+ notify : reload apache
9+
10+ - name : Enable config file
11+ shell : " a2ensite {{ www_config_file }}"
12+ args :
13+ creates : " /etc/apache2/sites-enabled/{{ www_config_file }}"
14+ notify : reload apache
15+
16+ - name : Ensure Apache is started and enabled
17+ service :
18+ name : apache2
19+ state : started
20+ enabled : yes
21+
22+ - include_tasks : deploy.yml
23+
Original file line number Diff line number Diff line change 1+ User-agent: *
2+ Disallow: /
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ rsync -rlptDC --timeout=600 --delete --delete-after \
4+ --include=' distributions/*.exe' --include=' manual/en/' \
5+ --include=' manual/en/**' --include=' manual/*.php' \
6+ --include=' manual/**' {{ rsync_address }}::phpweb \
7+ {{ www_docroot }}
Original file line number Diff line number Diff line change 1+ <VirtualHost *:80>
2+ ServerName {{ www_domain }}
3+ ServerAlias php.net {{ www_domain_alias }}
4+
5+ ServerAdmin {{ systems_email }}
6+ Redirect / https://{{ www_domain }}
7+ </VirtualHost>
8+
9+ <IfModule mod_ssl.c>
10+ <VirtualHost *:443>
11+ ServerAdmin {{ systems_email }}
12+ ServerName {{ www_domain }}
13+ ServerAlias php.net {{ www_domain_alias }}
14+
15+ DocumentRoot {{ www_docroot }}
16+
17+ # Logging
18+ ErrorLog ${APACHE_LOG_DIR}/{{ www_domain }}-error.log
19+ CustomLog ${APACHE_LOG_DIR}/{{ www_domain }}-access.log combined
20+
21+ # TLS Configuration with self-signed certificates
22+ SSLEngine on
23+ SSLCertificateFile /etc/ssl/certs/php-self-signed.crt
24+ SSLCertificateKeyFile /etc/ssl/certs/php-self-signed.key
25+
26+ # Property Specific Changes
27+ SetEnv MIRROR_LANGUAGE "en"
28+ SetEnv MIRROR_STATS "0"
29+
30+ <Directory {{ www_docroot }}>
31+ RewriteEngine On
32+ RewriteBase /
33+
34+ # Redirect /downloads to /downloads.php
35+ RewriteRule ^downloads$ %{DOCUMENT_ROOT}/downloads.php [QSA]
36+ </Directory>
37+
38+ ErrorDocument 401 /error.php
39+ ErrorDocument 403 /error.php
40+ ErrorDocument 404 /error.php
41+ </VirtualHost>
42+ </IfModule>
Original file line number Diff line number Diff line change 1+ www_docroot : /var/www/sites/www.php.net
2+ www_config_file : www.php.net.conf
3+
4+ # For the aliases where www was also configured, we set up redirects
5+ www_redirect_config_file : www-redirect.php.net.conf
6+ www_old_aliases : [ "static", "secure" ]
You can’t perform that action at this time.
0 commit comments