diff --git a/playbooks/include/proxies-fedora-web.yml b/playbooks/include/proxies-fedora-web.yml index 2a674628dd..395f1fdb68 100644 --- a/playbooks/include/proxies-fedora-web.yml +++ b/playbooks/include/proxies-fedora-web.yml @@ -49,6 +49,8 @@ website: alt.fedoraproject.org - role: fedora-web/src website: src.fedoraproject.org + - role: fedora-web/whatcanidoforfedora + website: whatcanidoforfedora.org # Some other static content, not strictly part of "fedora-web" goes below here - role: fedora-budget/proxy diff --git a/roles/fedora-web/whatcanidoforfedora/files/cron-sync-getfedora b/roles/fedora-web/whatcanidoforfedora/files/cron-sync-getfedora new file mode 100644 index 0000000000..475310a7d7 --- /dev/null +++ b/roles/fedora-web/whatcanidoforfedora/files/cron-sync-getfedora @@ -0,0 +1 @@ +25 * * * * root /usr/bin/rsync --delete -a --no-owner --no-group sundries01::whatcanidoforfedora.org/ /srv/web/whatcanidoforfedora.org/ diff --git a/roles/fedora-web/whatcanidoforfedora/tasks/main.yml b/roles/fedora-web/whatcanidoforfedora/tasks/main.yml index 8ed687d880..90cbd7e680 100644 --- a/roles/fedora-web/whatcanidoforfedora/tasks/main.yml +++ b/roles/fedora-web/whatcanidoforfedora/tasks/main.yml @@ -9,3 +9,9 @@ tags: - fedora-web - fedora-web/whatcanidoforfedora + +- name: Copy in the sync-whatcanidoforfedora cronjob + copy: src=cron-sync-whatcanidoforfedora dest=/etc/cron.d/sync-whatcanidoforfedora + tags: + - fedora-web + - fedora-web/whatcanidoforfedora diff --git a/roles/fedora-web/whatcanidoforfedora/templates/whatcanidoforfedora-web.conf b/roles/fedora-web/whatcanidoforfedora/templates/whatcanidoforfedora-web.conf index 78e92845ed..e2201bb47b 100644 --- a/roles/fedora-web/whatcanidoforfedora/templates/whatcanidoforfedora-web.conf +++ b/roles/fedora-web/whatcanidoforfedora/templates/whatcanidoforfedora-web.conf @@ -1,10 +1,9 @@ -# redirect to version without the www. on the front -RewriteEngine On -RewriteCond %{HTTP_HOST} ^www\.whatcanidoforfedora\.org [NC] -RewriteRule ^(.*)$ http://whatcanidoforfedora.org%{REQUEST_URI} [L,R=301] -RewriteCond %{HTTPS_HOST} ^www\.whatcanidoforfedora\.org [NC] -RewriteRule ^(.*)$ https://whatcanidoforfedora.org%{REQUEST_URI} [L,R=301] +DocumentRoot /srv/web/whatcanidoforfedora.org +Alias /favicon.ico /srv/web/fedoraproject.org/static/images/favicon.ico -ProxyPass / http://asknot-threebean.rhcloud.com/ -ProxyPassReverse / http://asknot-threebean.rhcloud.com/ -#{% if env == "production" %} +AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript + +FileETag MTime Size + +ExpiresActive On +ExpiresDefault "access plus 30 minutes"