Skip to content

Commit

Permalink
Update the git repo with latest changes on server
Browse files Browse the repository at this point in the history
  • Loading branch information
almet committed Jun 1, 2016
1 parent cc58321 commit e2def03
Show file tree
Hide file tree
Showing 11 changed files with 82 additions and 14 deletions.
41 changes: 32 additions & 9 deletions haproxy/haproxy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ frontend https
mode http
default_backend nginx_server

acl fourmilieres_redirect hdr_beg(host) -i fourmilieres.net
acl fourmilieres_redirect hdr_beg(host) -i www.fourmilieres.net
redirect location https://www.fourmilieres.net code 301 if fourmilieres_redirect
acl notmyidea_redirect hdr_beg(host) -i notmyidea.org
acl notmyidea_redirect hdr_beg(host) -i www.notmyidea.org
redirect location https://blog.notmyidea.org code 301 if notmyidea_redirect

acl host_hurl hdr_beg(host) -i hurl.
use_backend hurl_server if host_hurl

acl host_kinto_discourse_server hdr_beg(host) -i forums.kinto-storage.org
use_backend kinto_discourse_server if host_kinto_discourse_server
acl host_discourse_server hdr_beg(host) -i forum.
use_backend discourse_server if host_discourse_server

acl host_shout_notmyidea hdr_beg(host) -i shout.notmyidea.org
use_backend shout_notmyidea if host_shout_notmyidea
Expand All @@ -62,6 +62,13 @@ frontend https
acl host_board_notmyidea hdr_beg(host) -i board.
use_backend wekan_notmyidea if host_board_notmyidea

acl host_torrents_notmyidea hdr_beg(host) -i torrents.notmyidea.org
use_backend torrents_notmyidea if host_torrents_notmyidea

acl host_kinto hdr_beg(host) -i kinto.
use_backend kinto if host_kinto



frontend http
bind 0.0.0.0:80
Expand All @@ -74,24 +81,32 @@ frontend http
acl notmyidea_redirect hdr_beg(host) -i notmyidea.org
acl notmyidea_redirect hdr_beg(host) -i www.notmyidea.org
redirect location https://blog.notmyidea.org code 301 if notmyidea_redirect

acl no_https hdr_beg(host) -i board.notmyidea.org
acl fourmilieres_redirect hdr_beg(host) -i fourmilieres.net
acl fourmilieres_redirect hdr_beg(host) -i www.fourmilieres.net
redirect location https://www.fourmilieres.net code 301 if fourmilieres_redirect

acl host_board_notmyidea hdr_beg(host) -i board.
use_backend wekan_notmyidea if host_board_notmyidea

redirect scheme https code 301 if !{ ssl_fc } !letsencrypt_check !notmyidea_redirect !no_https
acl host_discourse_server hdr_beg(host) -i forum.
use_backend discourse_server if host_discourse_server

redirect scheme https code 301 if !{ ssl_fc } !letsencrypt_check !notmyidea_redirect


backend hurl_server
mode http
dispatch 127.0.0.1:9393

backend apache_server
mode http
dispatch 127.0.0.1:81

backend git_notmyidea
mode http
dispatch 127.0.0.1:3000

backend kinto_discourse_server
backend discourse_server
mode http
dispatch 127.0.0.1:9001

Expand All @@ -107,6 +122,14 @@ backend wekan_notmyidea
mode http
dispatch 127.0.0.1:9005

backend torrents_notmyidea
mode http
dispatch 127.0.0.1:9006

backend kinto
mode http
dispatch 127.0.0.1:9007

backend letsencrypt_backend
http-request set-header Host letsencrypt.requests
dispatch 127.0.0.1:8000
Expand Down
4 changes: 4 additions & 0 deletions letsencrypt/domains/fourmilieres.net
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

/home/poils/letsencrypt/letsencrypt-auto certonly --renew-by-default --webroot -w /home/www/letsencrypt-requests/ \
-d www.fourmilieres.net
3 changes: 1 addition & 2 deletions letsencrypt/domains/kinto-storage.org
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash

/home/poils/letsencrypt/letsencrypt-auto certonly --renew-by-default --webroot -w /home/www/letsencrypt-requests/ \
-d hurl.kinto-storage.org \
-d forums.kinto-storage.org
-d www.kinto-storage.org \

3 changes: 3 additions & 0 deletions letsencrypt/domains/notmyidea.org.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@
-d pad.notmyidea.org \
-d git.notmyidea.org \
-d board.notmyidea.org \
-d kinto.notmyidea.org \
-d static.notmyidea.org \
-d tvb.notmyidea.org \
-d photos.notmyidea.org
5 changes: 5 additions & 0 deletions letsencrypt/domains/reseaugrappe.org.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

/home/poils/letsencrypt/letsencrypt-auto certonly --renew-by-default --webroot -w /home/www/letsencrypt-requests/ \
-d board.reseaugrappe.org \
-d forum.reseaugrappe.org
2 changes: 0 additions & 2 deletions letsencrypt/install-certs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@
for domain in $(ls /etc/letsencrypt/live); do
cat /etc/letsencrypt/live/$domain/privkey.pem /etc/letsencrypt/live/$domain/fullchain.pem > /etc/ssl/letsencrypt/$domain.pem
done

service haproxy reload
10 changes: 10 additions & 0 deletions nginx/static.notmyidea.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

server {
listen 8000;
server_name static.notmyidea.org;

location / {
root /home/www/static.notmyidea.org/;
index index.html;
}
}
9 changes: 9 additions & 0 deletions nginx/tvb.notmyidea.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
server {
listen 8000;
server_name tvb.notmyidea.org;

location / {
root /home/www/tvb.notmyidea.org/;
index index.html;
}
}
9 changes: 9 additions & 0 deletions nginx/www.fourmilieres.net
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
server {
listen 8000;
server_name www.fourmilieres.net;

location / {
root /home/www/www.fourmilieres.net/;
index index.html;
}
}
2 changes: 1 addition & 1 deletion supervisor/board.notmyidea.org.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ user=www
autostart=true
autorestart=true
redirect_stderr=True
environment=MONGO_URL="mongodb://127.0.0.1:27017/wekan",ROOT_URL="https://board.notmyidea.org",PORT=9005
environment=MONGO_URL="mongodb://127.0.0.1:27017/wekan",ROOT_URL="https://board.notmyidea.org",PORT=9005,MAIL_URL="smtp://user:pass@localhost:26/"
8 changes: 8 additions & 0 deletions supervisor/kinto.notmyidea.org.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[program:kinto.notmyidea.org]
command=/home/www/kinto.notmyidea.org/env/bin/kinto start
directory=/home/www/kinto.notmyidea.org/
user=www
autostart=true
autorestart=true
redirect_stderr=True
environment=HOME="/home/www"

0 comments on commit e2def03

Please sign in to comment.