move config templates to extra

This commit is contained in:
Vyacheslav Anzhiganov 2015-12-02 02:42:25 +03:00
parent 37f115bed1
commit 9d545788da
5 changed files with 80 additions and 3 deletions

23
extra/nginx.conf Normal file
View file

@ -0,0 +1,23 @@
server {
listen 80;
server_name gocloud.ru www.gocloud.ru;
access_log /var/log/nginx/gocloud.ru_access.log;
error_log /var/log/nginx/gocloud.ru_error.log;
rewrite_log on;
index index.html;
location / {
#proxy_pass http://127.0.0.1:5001;
include uwsgi_params;
uwsgi_pass unix:/var/run/gocloudru_control.sock;
}
location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|bmp)$ {
root /var/lib/gocloud.ru/control;
access_log off;
expires 10d;
break;
}
}

35
extra/nginx_ssl.conf Normal file
View file

@ -0,0 +1,35 @@
server {
listen 80;
server_name gocloud.ru www.gocloud.ru;
rewrite ^(.*)$ https://$server_name$1 permanent;
}
server {
listen 443 ssl;
server_name gocloud.ru www.gocloud.ru;
access_log /var/log/nginx/gocloud.ru_access.log;
error_log /var/log/nginx/gocloud.ru_error.log;
ssl on;
ssl_certificate /var/lib/gocloud.ru/control/ssl/1_gocloud.ru_bundle.crt;
ssl_certificate_key /var/lib/gocloud.ru/control/ssl/2_gocloud.ru.key;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;
root /var/lib/gocloud.ru/control;
location / {
#proxy_pass http://127.0.0.1:5001;
include uwsgi_params;
uwsgi_pass unix:/var/run/gocloudru_control.sock;
}
location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|bmp)$ {
access_log off;
expires 10d;
break;
}
}

19
extra/supervisor.conf Normal file
View file

@ -0,0 +1,19 @@
[program:gocloudru_control]
directory=/var/lib/gocloud.ru/control
autostart=true
autorestart=true
startsecs=1
startretries=777
exitcodes=0,2
stopsignal=TERM
stopwaitsecs=1
user=root
group=root
command=python uwsgi.py
environment=PATH="/var/env/gocloud.ru/bin"
#stdout_logfile=/var/log/procdnru_control.log
stdout_logfile_maxbytes=5MB
stdout_logfile_backups=5
#stderr_logfile=/var/log/procdnru_control_errors.log
stderr_logfile_maxbytes=5MB
stderr_logfile_backups=2

View file

@ -1,14 +1,14 @@
[uwsgi]
;virtualenv
;virtualenv = /var/env/gocloud.ru/
virtualenv=/home/vanzhiganov/env/gocloud_server/
virtualenv = /var/env/gocloud.ru/
;virtualenv=/home/vanzhiganov/env/gocloud_server/
;for http
;protocol = http
;socket = 127.0.0.1:8080
; for unix-socket
socket = /tmp/procdnru_server.sock
socket = /var/run/procdnru_control.sock
chmod-socket = 770
module = app:app