Nginx Django example vhost file
Дусал нэвтэрхий толь-с
user@host:~$ cat /etc/nginx/sites-available/domain.com.vhost server { listen 202.21.123.114:80; listen 202.21.123.114:443 ssl; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_certificate /var/www/clients/client0/web1/ssl/domain.com.crt; ssl_certificate_key /var/www/clients/client0/web1/ssl/domain.com.key; server_name domain.com www.domain.com; root /var/www/domain.com/web/; index index.html index.htm index.php index.cgi index.pl index.xhtml; gzip on; gzip_proxied any; gzip_vary on; gzip_http_version 1.1; gzip_types application/javascript application/json text/css text/xml; gzip_comp_level 4; error_page 400 /error/400.html; error_page 401 /error/401.html; error_page 403 /error/403.html; error_page 404 /error/404.html; error_page 405 /error/405.html; error_page 500 /error/500.html; error_page 502 /error/502.html; error_page 503 /error/503.html; recursive_error_pages on; location = /error/400.html { internal; } location = /error/401.html { internal; } location = /error/403.html { internal; } location = /error/404.html { internal; } location = /error/405.html { internal; } location = /error/500.html { internal; } location = /error/502.html { internal; } location = /error/503.html { internal; } error_log /var/log/ispconfig/httpd/domain.com/error.log; access_log /var/log/ispconfig/httpd/domain.com/access.log combined; location ~ /\. { deny all; } location ^~ /.well-known/acme-challenge/ { access_log off; log_not_found off; auth_basic off; root /usr/local/ispconfig/interface/acme/; autoindex off; index index.html; try_files $uri $uri/ =404; } location = /favicon.ico { access_log off; log_not_found off; } location = /robots.txt { allow all; log_not_found off; access_log off; } location /stats/ { index index.html index.php; auth_basic "Members Only"; auth_basic_user_file /var/www/clients/client0/web1/web//stats/.htpasswd_stats; } location ^~ /awstats-icon { alias /usr/share/awstats/icon; } location ~ \.php$ { try_files /0a5e9d28c6a45b7bc2aeda9ae272558iu.htm @php; } location @php { deny all; } location /static/ { root /var/www/clients/client0/web1/web; } location /media/ { root /var/www/clients/client0/web1/web; } location /css/ { root /var/www/clients/client0/web1/web; } location /js/ { root /var/www/clients/client0/web1/web; } location /fonts/ { root /var/www/clients/client0/web1/web; } location / { include proxy_params; proxy_pass http://unix:/run/gunicorn.sock; client_max_body_size 20M; } }