добавил конфиг для технических работ

remotes/origin/stage5
Alexander Burdeiny 10 years ago
parent 96f3408798
commit 1b617ab45f
  1. 9
      fabfile.py
  2. 3
      support/dev/hit.expomap.ru
  3. 4
      support/dev/proj.com
  4. 81
      support/dev/tech_work_hit.expomap.ru
  5. 25
      support/dev_work.html
  6. 6
      support/prod/proj.com
  7. 2
      templates/client/base_catalog.html
  8. 4
      templates/client/includes/feedback.html

9
fabfile.py vendored

@ -17,6 +17,7 @@ env.passwords = {
REMOTE_HOME_DIR = '/home/www/expomap/'
LOCAL_HOME_DIR = '/home/alexander/projects/expomap/'
nginx_conf_tech = '/etc/nginx/sites-available/tech_work_hit.expomap.ru'
nginx_conf = '/etc/nginx/sites-available/hit.expomap.ru'
apache2_conf = '/etc/apache2/sites-available/proj.com'
settings_conf = join(REMOTE_HOME_DIR, 'proj/settings.py')
@ -137,6 +138,14 @@ def migrate(app_name):
run('python manage.py migrate {app_name}'.format(app_name=app_name))
def devmode(state):
localdir = join(LOCAL_HOME_DIR, 'support/', env.role)
# nginx
conf = nginx_conf_tech if state else nginx_conf
put(join(localdir, basename(conf)), nginx_conf)
run('/etc/init.d/nginx reload')
@stage(5)
def t1451():
with cd(REMOTE_HOME_DIR):

@ -20,9 +20,6 @@ server {
add_header Strict-Transport-Security "max-age=31536000;";
add_header Content-Security-Policy-Report-Only "default-src https:; script-src https: 'unsafe-eval' 'unsafe-inline'; style-src https: 'unsafe-inline'; img-src https: data:; font-src https: data:";
client_header_timeout 360s;
location / {
auth_basic "Unauthorized";

@ -1,5 +1,5 @@
<VirtualHost 127.0.0.1:8080>
WSGIDaemonProcess www-data display-name=%{GROUP} processes=2 threads=2
WSGIDaemonProcess www-data display-name=%{GROUP} processes=8 threads=2
WSGIProcessGroup www-data
WSGIScriptAlias / "/home/www/proj/project.wsgi"
ServerName 176.121.11.165
@ -9,7 +9,7 @@
Allow from all
IndexOptions FancyIndexing
</Directory>
Alias /media "/home/www/proj/media/"
Alias /static "/home/www/proj/static/"

@ -0,0 +1,81 @@
server {
# server_name 176.121.11.165 expomap.ru www.expomap.ru dev.expomap.ru;
listen 80;
return 301 https://$host$request_uri;
}
server {
listen 443;
server_name 176.121.11.165 www.expomap.ru expomap.ru dev.expomap.ru;
#ssl_stapling on;
ssl on;
ssl_certificate /etc/nginx/ssl/expomap.ru.crt;
ssl_certificate_key /etc/nginx/ssl/expomap.ru.key;
ssl_dhparam /etc/nginx/ssl/dhparam.pem;
ssl_session_timeout 24h;
ssl_session_cache shared:SSL:25m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers kEECDH+AES128:kEECDH:kEDH:-3DES:kRSA+AES128:kEDH+3DES:DES-CBC3-SHA:!RC4:!aNULL:!eNULL:!MD5:!EXPORT:!LOW:!SEED:!CAMELLIA:!IDEA:!PSK:!SRP:!SSLv2;
ssl_prefer_server_ciphers on;
add_header Strict-Transport-Security "max-age=31536000;";
add_header Content-Security-Policy-Report-Only "default-src https:; script-src https: 'unsafe-eval' 'unsafe-inline'; style-src https: 'unsafe-inline'; img-src https: data:; font-src https: data:";
client_header_timeout 360s;
error_page 503 /dev_work.html;
location / {
return 503;
auth_basic "Unauthorized";
auth_basic_user_file /home/www/proj/.htpasswd;
proxy_pass http://127.0.0.1:8080/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
include /etc/nginx/geoip_proxy.conf;
client_max_body_size 100m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 16k;
proxy_buffers 256 8k;
proxy_busy_buffers_size 2000k;
proxy_temp_file_write_size 2048k;
}
location /965E1EE7949FD639CA0124C8D8C57774.txt {
root /home/www/proj/;
}
location /4885b11a73674eb6d54593c1d7efd758821e5ee79b8132feecaba10560f0123a.html {
root /home/www/proj/support;
}
location /static {
root /home/www/proj;
}
location /media {
root /home/www/proj;
}
location /templates {
root /home/www/proj/static;
}
location /subdmn {
root /home/old_files;
}
location = /dev_work.html {
root home/www/proj/support/;
internal;
}
}

@ -0,0 +1,25 @@
<html>
<head>
<title>Извините, идут технические работы</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Pragma" content="no-cache">
<style>
body{
margin:0px;
font-family:Arial;
}
.head{
height:70px;
background-color:#c7d9f0;
}
.body{
padding-top:70px;
text-align:center;
}
</style>
</head>
<body style="margin:0;">
<div class="head"></div>
<div class="body">Извините, идут технические работы.</div>
</body>
</html>

@ -1,15 +1,15 @@
<VirtualHost 127.0.0.1:8080>
WSGIDaemonProcess www-data display-name=%{GROUP} processes=8 threads=1
WSGIDaemonProcess www-data display-name=%{GROUP} processes=16 threads=1
WSGIProcessGroup www-data
WSGIScriptAlias / "/home/www/proj/project.wsgi"
ServerName hit.expomap.ru
ServerName hit.expomap.ru
<Directory "/home/www/proj/">
Order allow,deny
Options Indexes FollowSymLinks
Allow from all
IndexOptions FancyIndexing
</Directory>
Alias /media "/home/www/proj/media/"
Alias /static "/home/www/proj/static/"

@ -12,9 +12,9 @@
<div class="sbg"></div>
{% include 'client/includes/menu.html' %}
<hr/>
{% comment %}
{% include 'client/includes/feedback.html' %}
<hr />
{% comment %}
{% endcomment %}
{# {% include 'client/includes/online_consult.html' %} #}

@ -2,6 +2,6 @@
<div class="s-phone">
<div class="sp-wrap">
<div class="s-tel clearfix"><em>+7 (499)</em> <b>999-12-07</b></div>
<div class="s-callback"><a class="pw-open" href="#pw-callback">{% trans 'обратный звонок' %}</a></div>
{# <div class="s-callback"><a class="pw-open" href="#pw-callback">{% trans 'обратный звонок' %}</a></div> #}
</div>
</div>
</div>

Loading…
Cancel
Save