Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@noc:/usr/local/etc/nginx # cat nginx.conf
- events {
- worker_connections 1024;
- use kqueue;
- }
- worker_processes 8;
- timer_resolution 100ms;
- worker_rlimit_nofile 8192;
- worker_priority -5;
- error_log /var/log/nginx.error_log debug;
- http {
- include mime.types;
- default_type application/octet-stream;
- sendfile off;
- keepalive_timeout 15;
- server {
- listen 80;
- server_name noc;
- location /media/ {
- alias /opt/noc/lib/python2.7/site-packages/django/contrib/admin/static/;
- gzip on;
- gzip_types text/css text/x-js;
- }
- location /static/ {
- alias /opt/noc/static/;
- gzip on;
- gzip_types text/css text/x-js;
- }
- location ~ ^([^/]+)/([^/]+)/(js|css|img)/(.+)$ {
- root /opt/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;
- }
- }
- }
- root@noc:/usr/local/etc/nginx #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement