Domain setup and archive message
This commit is contained in:
parent
823e383ae3
commit
0626be3997
3 changed files with 56 additions and 42 deletions
|
@ -1,12 +1,14 @@
|
||||||
#{{ ansible_managed }}
|
#{{ ansible_managed }}
|
||||||
|
|
||||||
|
# Main site configuration for public-health.ch
|
||||||
|
|
||||||
upstream wagtail-site {
|
upstream wagtail-site {
|
||||||
server localhost:5000;
|
server localhost:5000;
|
||||||
}
|
}
|
||||||
server {
|
server {
|
||||||
listen [::]:80;
|
listen [::]:80 default_server;
|
||||||
listen 80;
|
listen 80 default_server;
|
||||||
server_name {{ domain }};
|
server_name {{ domain }} sphc.ch;
|
||||||
|
|
||||||
client_max_body_size 16M;
|
client_max_body_size 16M;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#{{ ansible_managed }}
|
#{{ ansible_managed }}
|
||||||
|
|
||||||
# Web archive and other special configurations for public-health.ch
|
# Web archive and other special configurations
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
|
@ -10,9 +10,12 @@ server {
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ =404;
|
try_files $uri $uri/ =404;
|
||||||
}
|
}
|
||||||
|
add_after_body /archive-message.html;
|
||||||
|
location = /archive-message.html {
|
||||||
|
root {{ release_dir }}/static/org/archive-message.html;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO: parameterize
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name conference.{{ domain }};
|
server_name conference.{{ domain }};
|
||||||
|
@ -23,40 +26,3 @@ server {
|
||||||
return 301 $scheme://sph17.organizers-congress.org;
|
return 301 $scheme://sph17.organizers-congress.org;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Conference site
|
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
server_name sphc.ch www.sphc.ch;
|
|
||||||
|
|
||||||
client_max_body_size 16M;
|
|
||||||
|
|
||||||
gzip on;
|
|
||||||
gzip_types text/plain text/css application/x-javascript image/svg+xml;
|
|
||||||
gzip_comp_level 1;
|
|
||||||
gzip_disable msie6;
|
|
||||||
gzip_http_version 1.0;
|
|
||||||
gzip_proxied any;
|
|
||||||
gzip_vary on;
|
|
||||||
|
|
||||||
location /static/ {
|
|
||||||
return 301 $scheme://public-health.ch$request_uri;
|
|
||||||
}
|
|
||||||
location /static/CACHE/ {
|
|
||||||
return 301 $scheme://public-health.ch$request_uri;
|
|
||||||
}
|
|
||||||
location /favicon.ico {
|
|
||||||
return 301 $scheme://public-health.ch$request_uri;
|
|
||||||
}
|
|
||||||
location /media/images {
|
|
||||||
return 301 $scheme://public-health.ch$request_uri;
|
|
||||||
}
|
|
||||||
|
|
||||||
location / {
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header Host $http_host;
|
|
||||||
proxy_redirect off;
|
|
||||||
proxy_pass http://wagtail-site;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
46
publichealth/static/org/archive-message.html
Normal file
46
publichealth/static/org/archive-message.html
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
<h3 class="archive-message">
|
||||||
|
You are browsing the archived version of this website.
|
||||||
|
<a href="https://public-health.ch">Go to new site</a>
|
||||||
|
</h3>
|
||||||
|
<style>
|
||||||
|
.archive-message {
|
||||||
|
padding: 2em;
|
||||||
|
background: red;
|
||||||
|
color: white;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0px;
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
left: 0px;
|
||||||
|
}
|
||||||
|
.archive-message a {
|
||||||
|
border-radius: 5px;
|
||||||
|
border: 0;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-family: Helvetica,Arial,sans-serif;
|
||||||
|
font-weight: 700;
|
||||||
|
padding: 12px 24px;
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: 0;
|
||||||
|
font-weight: 400;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
touch-action: manipulation;
|
||||||
|
cursor: pointer;
|
||||||
|
background-image: none;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
white-space: nowrap;
|
||||||
|
padding: 6px 12px;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.42857;
|
||||||
|
border-radius: 0;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
text-decoration: none;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #1e0e33;
|
||||||
|
color: #1e0e33;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Add table
Reference in a new issue