Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- worker_processes 1;
- events {
- worker_connections 1024;
- }
- http {
- include mime.types;
- default_type application/octet-stream;
- sendfile on;
- keepalive_timeout 65;
- server {
- listen 80;
- server_name 10.34.58.156;
- location /media/ {
- alias /usr/local/noc/lib/python2.7/site-packages/django/contrib/admin/static/;
- gzip on;
- gzip_types text/css text/x-js;
- }
- location /static/ {
- alias /usr/local/noc/static/;
- gzip on;
- gzip_types text/css text/x-js;
- }
- location ~ ^/(?!(media|static))([^/]+)/([^/]+)/(js|css|img)/(.+)$ {
- root /usr/local/noc;
- rewrite ^/([^/]+)/([^/]+)/(js|css|img)/(.+)$
- /$1/apps/$2/$3/$4 break;
- gzip on;
- gzip_types text/css text/x-js;
- }
- location / {
- proxy_pass http://127.0.0.1:8000/;
- gzip on;
- gzip_types text/css text/x-js;
- proxy_set_header Host $http_host;
- proxy_set_header X-Scheme $scheme;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment