Skip to content

Commit

Permalink
Added gestion tool
Browse files Browse the repository at this point in the history
the-glu committed Oct 31, 2013
1 parent 1139d90 commit 0ce5396
Showing 5 changed files with 749 additions and 0 deletions.
43 changes: 43 additions & 0 deletions files/gestion/apache.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<VirtualHost *:80>
ServerAdmin webmaster@localhost

WSGIDaemonProcess djangoP processes=10 threads=15 display-name=%{GROUP} python-path=/var/www/git-repo/azimut-gestion/
WSGIProcessGroup djangoP
WSGIScriptAlias / /var/www/git-repo/azimut-gestion/app/wsgi.py
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On

DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

<Directory /var/www/git-repo/azimut-gestion/>
Options -Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /media/ /var/www/git-repo/azimut-gestion/media/

<Directory /var/www/git-repo/azimut-gestion/media/>
Order Allow,Deny
Allow from All
</Directory>

Alias /static/ /var/www/git-repo/azimut-gestion/static/

<Directory /var/www/git-repo/azimut-gestion/static/>
Order Allow,Deny
Allow from All
</Directory>

</VirtualHost>
2 changes: 2 additions & 0 deletions files/gestion/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Host *
StrictHostKeyChecking no
25 changes: 25 additions & 0 deletions files/gestion/nat-vz
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh

case "$1" in
start) echo "Starting iptables NAT for openvz"
/sbin/iptables -t nat -D POSTROUTING -s 10.7.0.0/24 -o %(interface)s -j SNAT --to %(server_ip)s
/sbin/iptables -t nat -A POSTROUTING -s 10.7.0.0/24 -o %(interface)s -j SNAT --to %(server_ip)s
/sbin/iptables -t nat -A PREROUTING -i %(interface)s -p tcp --dport 10122 -j DNAT --to 10.7.0.1:22
/sbin/iptables -t nat -A PREROUTING -i %(interface)s -p tcp --dport 10222 -j DNAT --to 10.7.0.2:22
/sbin/iptables -t nat -A PREROUTING -i %(interface)s -p tcp --dport 80 -j DNAT --to 10.7.0.1:80

;;
stop) echo "Stopping iptables NAT for openvz"
/sbin/iptables -t nat -D POSTROUTING -s 10.7.0.0/24 -o %(interface)s -j SNAT --to %(server_ip)s
/sbin/iptables -t nat --flush PREROUTING

;;
flush) echo "Flusing iptables NAT for openvz"
/sbin/iptables -t nat --flush PREROUTING

;;
*) echo "Usage: /etc/init.d/nat-vz {start|stop|flush}"
exit 2
;;
esac
exit 0
9 changes: 9 additions & 0 deletions files/gestion/ngnix.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
server {
listen 80;
server_name %(gestion_hostname)s;

location / {
proxy_pass http://10.7.0.2/;
access_log off;
}
}
670 changes: 670 additions & 0 deletions gestion.py

Large diffs are not rendered by default.

0 comments on commit 0ce5396

Please sign in to comment.