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 %}