Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name mydomain.ru;
- charset utf8;
- autoindex off;
- access_log /srv/logs/mydomain.ru_access.log;
- error_log /srv/logs/mydomain.ru_error.log error;
- set $project_home /srv/www/mydomain.ru;
- set $media_home /srv/www/httpdocs;
- root $project_home;
- location / {
- root $project_home;
- try_files $uri @webadm;
- }
- location ~* ^/(images|img|css|js|fonts|files) {
- root $media_home/media;
- expires 1w;
- }
- location ~* ^/(media|static) {
- root $media_home;
- expires 1w;
- }
- gzip on;
- gzip_min_length 1000;
- gzip_proxied expired no-cache no-store private auth;
- gzip_disable "MSIE [1-6]\.(?!.*SV1)";
- gzip_static on;
- gzip_types text/plain application/xml text/css application/javascript application/x-javascript text/javascript application/x-woff image/gif image/jpeg image/pjpeg image/png;
- location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|css|js)$ {
- expires 7d;
- }
- location @webadm {
- uwsgi_pass wsgi_mydomain.ru;
- uwsgi_read_timeout 2400;
- include uwsgi_params;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment