I'd like to set up a proxy from fp.o/mobile -> fedora-infra.github.io/mobile.
After talking with nirik on irc, we decided that for now this is the way to go, and later on we can move things around if we decide to.
diff --git a/manifests/services/proxy.pp b/manifests/services/proxy.pp index 2d615b0..316b6de 100644 --- a/manifests/services/proxy.pp +++ b/manifests/services/proxy.pp @@ -432,6 +432,12 @@ class proxy { proxyurl => "http://localhost:10018", }
+ fedora-mobile::proxy { "fedoraproject.org/mobile": + website => "fedoraproject.org", + path => "/mobile", + proxyurl => "http://fedora-infra.github.io/mobile", + } + httpd::mime-type { "site icon": website => "fedoraproject.org", mimetype => "image/vnd.microsoft.icon", diff --git a/modules/fedora-mobile/README b/modules/fedora-mobile/README new file mode 100644 index 0000000..770f746 --- /dev/null +++ b/modules/fedora-mobile/README @@ -0,0 +1,5 @@ +# Fedora Mobile landing site + +This proxies fp.o/mobile to github pages: + +http://fedora-infra.github.io/mobile/ diff --git a/modules/fedora-mobile/manifests/init.pp b/modules/fedora-mobile/manifests/init.pp new file mode 100644 index 0000000..6626b9b --- /dev/null +++ b/modules/fedora-mobile/manifests/init.pp @@ -0,0 +1,16 @@ +define fedora-mobile::proxy( + $website, + $path, + $proxyurl +) { + include httpd::base + + file { "/etc/httpd/conf.d/$website/fedora-mobile.conf": + owner => "root", + group => "root", + mode => 0644, + content => template("fedora-mobile/fedora-mobile-proxy.conf.erb"), + notify => Service["httpd"], + require => Httpd::Website[$website], + } +} diff --git a/modules/fedora-mobile/templates/fedora-mobile-proxy.conf.erb b/modules/fedora-mobile/templates/fedora-mobile-proxy.conf.erb new file mode 100644 index 0000000..c6fc6db --- /dev/null +++ b/modules/fedora-mobile/templates/fedora-mobile-proxy.conf.erb @@ -0,0 +1,4 @@ +RewriteEngine On + +ProxyPass <%= path %> <%= proxyurl %> +ProxyPassReverse <%= path %> <%= proxyurl %>
On Wed, 26 Jun 2013 15:23:10 -0400 Ricky Elrod codeblock@elrod.me wrote:
I'd like to set up a proxy from fp.o/mobile -> fedora-infra.github.io/mobile.
After talking with nirik on irc, we decided that for now this is the way to go, and later on we can move things around if we decide to.
+1
kevin
On Wed, Jun 26, 2013 at 03:23:10PM -0400, Ricky Elrod wrote:
I'd like to set up a proxy from fp.o/mobile -> fedora-infra.github.io/mobile.
After talking with nirik on irc, we decided that for now this is the way to go, and later on we can move things around if we decide to.
Since this is a proxy, what happens to cookies that are sent to when you hit https://fedoraproject.org/mobile ? Are they forwarded to github.io?
-Toshio
On 06/26/2013 03:36 PM, Toshio Kuratomi wrote:
Since this is a proxy, what happens to cookies that are sent to when you hit https://fedoraproject.org/mobile ? Are they forwarded to github.io?
Really good point.
This might fix it.
-Ricky
diff --git a/manifests/services/proxy.pp b/manifests/services/proxy.pp index 2d615b0..316b6de 100644 --- a/manifests/services/proxy.pp +++ b/manifests/services/proxy.pp @@ -432,6 +432,12 @@ class proxy { proxyurl => "http://localhost:10018", }
+ fedora-mobile::proxy { "fedoraproject.org/mobile": + website => "fedoraproject.org", + path => "/mobile", + proxyurl => "http://fedora-infra.github.io/mobile", + } + httpd::mime-type { "site icon": website => "fedoraproject.org", mimetype => "image/vnd.microsoft.icon", diff --git a/modules/fedora-mobile/README b/modules/fedora-mobile/README new file mode 100644 index 0000000..770f746 --- /dev/null +++ b/modules/fedora-mobile/README @@ -0,0 +1,5 @@ +# Fedora Mobile landing site + +This proxies fp.o/mobile to github pages: + +http://fedora-infra.github.io/mobile/ diff --git a/modules/fedora-mobile/manifests/init.pp b/modules/fedora-mobile/manifests/init.pp new file mode 100644 index 0000000..6626b9b --- /dev/null +++ b/modules/fedora-mobile/manifests/init.pp @@ -0,0 +1,16 @@ +define fedora-mobile::proxy( + $website, + $path, + $proxyurl +) { + include httpd::base + + file { "/etc/httpd/conf.d/$website/fedora-mobile.conf": + owner => "root", + group => "root", + mode => 0644, + content => template("fedora-mobile/fedora-mobile-proxy.conf.erb"), + notify => Service["httpd"], + require => Httpd::Website[$website], + } +} diff --git a/modules/fedora-mobile/templates/fedora-mobile-proxy.conf.erb b/modules/fedora-mobile/templates/fedora-mobile-proxy.conf.erb new file mode 100644 index 0000000..9da4748 --- /dev/null +++ b/modules/fedora-mobile/templates/fedora-mobile-proxy.conf.erb @@ -0,0 +1,8 @@ +RewriteEngine On + +ProxyPass <%= path %> <%= proxyurl %> +ProxyPassReverse <%= path %> <%= proxyurl %> + +<Location "/mobile"> + RequestHeader unset Cookie +</Location>
Looks like it should work to me.
We can test that no cookies are being sent to github once its running. Looks like we can also test the config in stg first to make sure it won't affect the production services (like logging into the wiki).
+1 with those notes about testing
-Toshio
On Wed, Jun 26, 2013 at 03:56:28PM -0400, Ricky Elrod wrote:
On 06/26/2013 03:36 PM, Toshio Kuratomi wrote:
Since this is a proxy, what happens to cookies that are sent to when you hit https://fedoraproject.org/mobile ? Are they forwarded to github.io?
Really good point.
This might fix it.
-Ricky
diff --git a/manifests/services/proxy.pp b/manifests/services/proxy.pp index 2d615b0..316b6de 100644 --- a/manifests/services/proxy.pp +++ b/manifests/services/proxy.pp @@ -432,6 +432,12 @@ class proxy { proxyurl => "http://localhost:10018", }
- fedora-mobile::proxy { "fedoraproject.org/mobile":
website => "fedoraproject.org",
path => "/mobile",
proxyurl => "http://fedora-infra.github.io/mobile",
- }
- httpd::mime-type { "site icon": website => "fedoraproject.org", mimetype => "image/vnd.microsoft.icon",
diff --git a/modules/fedora-mobile/README b/modules/fedora-mobile/README new file mode 100644 index 0000000..770f746 --- /dev/null +++ b/modules/fedora-mobile/README @@ -0,0 +1,5 @@ +# Fedora Mobile landing site
+This proxies fp.o/mobile to github pages:
+http://fedora-infra.github.io/mobile/ diff --git a/modules/fedora-mobile/manifests/init.pp b/modules/fedora-mobile/manifests/init.pp new file mode 100644 index 0000000..6626b9b --- /dev/null +++ b/modules/fedora-mobile/manifests/init.pp @@ -0,0 +1,16 @@ +define fedora-mobile::proxy(
- $website,
- $path,
- $proxyurl
+) {
- include httpd::base
- file { "/etc/httpd/conf.d/$website/fedora-mobile.conf":
owner => "root",
group => "root",
mode => 0644,
content => template("fedora-mobile/fedora-mobile-proxy.conf.erb"),
notify => Service["httpd"],
require => Httpd::Website[$website],
- }
+} diff --git a/modules/fedora-mobile/templates/fedora-mobile-proxy.conf.erb b/modules/fedora-mobile/templates/fedora-mobile-proxy.conf.erb new file mode 100644 index 0000000..9da4748 --- /dev/null +++ b/modules/fedora-mobile/templates/fedora-mobile-proxy.conf.erb @@ -0,0 +1,8 @@ +RewriteEngine On
+ProxyPass <%= path %> <%= proxyurl %> +ProxyPassReverse <%= path %> <%= proxyurl %>
+<Location "/mobile">
- RequestHeader unset Cookie
+</Location>
infrastructure mailing list infrastructure@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/infrastructure
infrastructure@lists.fedoraproject.org