1
0
Fork 0
forked from infra/ansible

Try setting up geoip-city-wsgi/proxy.

This commit is contained in:
Ralph Bean 2014-12-17 19:33:50 +00:00
commit b726711fce
7 changed files with 119 additions and 9 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 938 KiB

View file

@ -0,0 +1,40 @@
<html><head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<link type="text/css" rel="stylesheet" href="https://apps.fedoraproject.org/bootstrap/css/bootstrap.min.css">
<style>
body {
background: url(globe.png) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
#textbits {
position: fixed;
top:300px;
left: 75px;
max-width: 375px;
}
.footer {
padding: 40px;
}
</style>
</head>
<body>
<div id="textbits">
<h1>geoip</h1>
<p class="lead">
This service is running
<a href="https://github.com/fedora-infra/geoip-city-wsgi">geoip city wsgi</a>.
</p><hr>
<a class="btn btn-default" href="https://geoip.fedoraproject.org/city">Try it out!</a>
<div class="clearfix"></div>
<div class="footer text-center"><small class="text-muted"><a href="https://commons.wikimedia.org/wiki/File:3quarter_globe.jpg">Original
globe image</a> by Minnesota Historical Society <a href="http://www.gnu.org/copyleft/fdl.html">GFDL</a> or <a href="http://creativecommons.org/licenses/by-sa/3.0">CC-BY-SA-3.0</a>,
via Wikimedia Commons.
</small></div>
<p></p>
</div>
</body></html>

View file

@ -0,0 +1,25 @@
- name: Copy in the proxy conf
template: >
src=geoip-city-wsgi-proxy.conf
dest=/etc/httpd/conf.d/{{website}}/geoip-city-wsgi-proxy.conf
owner=root group=root mode=0644
notify:
- restart httpd
tags:
- geoip-city-wsgi
- geoip-city-wsgi/proxy
- name: Make a dir for our fancy about page. So chic!
file: dest=/srv/web/geoip state=directory mode=0644 owner=root group=root
tags:
- geoip-city-wsgi
- geoip-city-wsgi/proxy
- name: "Copy in the fancy about page stuff. It's like wsgi with geoip aioli"
copy: src={{item}} dest=/srv/web/geoip/{{item}} mode=0644 owner=root group=root
with_items:
- index.html
- globe.png
tags:
- geoip-city-wsgi
- geoip-city-wsgi/proxy

View file

@ -0,0 +1,6 @@
RewriteEngine On
RewriteRule ^/city(.*) {{proxyurl}}/city$1 [P,L]
ProxyPassReverse /city {{proxyurl}}/city
Alias / /srv/web/geoip/