server
{
    listen 80;
    server_name _;
    index index.html index.htm index.php default.html default.htm default.php;
    root /home/wwwroot/extsuite ;

    #qymail
    location ~ ^/static/admin(/|$) {
        root /usr/lib64/python2.7/site-packages/django/contrib/admin ;
    }

    location ~ ^/static(/|$) {
        root  /home/wwwroot/QYMail;
    }

    location /account/ {
        include     uwsgi_params;
        uwsgi_read_timeout 300;
        uwsgi_pass  unix:/home/postfix/var/QYMail.sock;
    }
    location /settings/ {
        include     uwsgi_params;
        uwsgi_read_timeout 300;
        uwsgi_pass  unix:/home/postfix/var/QYMail.sock;
    }
    location /users/ {
        include     uwsgi_params;
        uwsgi_read_timeout 300;
        uwsgi_pass  unix:/home/postfix/var/QYMail.sock;
    }
    location /api/ {
        include     uwsgi_params;
        uwsgi_read_timeout 300;
        uwsgi_pass  unix:/home/postfix/var/QYMail.sock;
    }
    location /statistics/ {
        include     uwsgi_params;
        uwsgi_read_timeout 300;
        uwsgi_pass  unix:/home/postfix/var/QYMail.sock;
    }

    #roundcube
    location ~ ^/.*\.php(/|$) {
        try_files $uri =404;
        fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
        fastcgi_index index.php;
        include fastcgi.conf;
        #include pathinfo.conf;
    }
    location ^~ /config/ { return 404; }
    location ^~ /temp/ { return 404; }
    location ^~ /logs/ { return 404; }

    access_log  /var/log/nginx/mail.log;
}