From c586bdf5a3239731ca6b24cb27823c72d7add520 Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Thu, 30 Apr 2015 19:55:40 +0000 Subject: [PATCH] and add a website thing and get threebean and puiterwijk to review --- playbooks/include/proxies-websites.yml | 8 ++++++++ .../whatcanidoforfedora/tasks/main.yml | 11 +++++++++++ .../templates/whatcanidoforfedora-web.conf | 17 +++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 roles/fedora-web/whatcanidoforfedora/tasks/main.yml create mode 100644 roles/fedora-web/whatcanidoforfedora/templates/whatcanidoforfedora-web.conf diff --git a/playbooks/include/proxies-websites.yml b/playbooks/include/proxies-websites.yml index efc46d5515..46f9db7c64 100644 --- a/playbooks/include/proxies-websites.yml +++ b/playbooks/include/proxies-websites.yml @@ -296,7 +296,15 @@ - www.389tcp.org ssl: false cert_name: "{{wildcard_cert_name}}" + + - role: httpd/website + name: whatcanidoforfedora.org + server_aliases: + - www.whatcanidoforfedora.org + ssl: false + cert_name: "{{wildcard_cert_name}}" + - role: httpd/website name: fedoramagazine.org server_aliases: [www.fedoramagazine.org stg.fedoramagazine.org] diff --git a/roles/fedora-web/whatcanidoforfedora/tasks/main.yml b/roles/fedora-web/whatcanidoforfedora/tasks/main.yml new file mode 100644 index 0000000000..00f9c79fdb --- /dev/null +++ b/roles/fedora-web/whatcanidoforfedora/tasks/main.yml @@ -0,0 +1,11 @@ +- name: Copy some config files for {{website}} + template: > + src={{item}} dest=/etc/httpd/conf.d/{{website}}/{{item}} + owner=root group=root mode=0644 + with_items: + - whatcanidoforfedora-web.conf + notify: + - restart httpd + 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 new file mode 100644 index 0000000000..441d095317 --- /dev/null +++ b/roles/fedora-web/whatcanidoforfedora/templates/whatcanidoforfedora-web.conf @@ -0,0 +1,17 @@ +# 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] + +ProxyPass / http://asknot-threebean.rhcloud.com/ +ProxyPassReverse / http://asknot-threebean.rhcloud.com/ +#{% if env == "production" %} +#ProxyPass / http://66.226.72.63/ +#ProxyPassReverse / http://66.226.72.63/ +#{% else %} +## In staging we point to the staging version of the magazine +#ProxyPass / http://104.207.133.220/ +#ProxyPassReverse / http://104.207.133.220/ +#{% endif %}