Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 443 ssl;
- server_name monitorsky.com;
- client_max_body_size 20m;
- ## Deny illegal Host headers
- if ($host !~* ^monitorsky\.com$ ) {
- return 444;
- }
- location /robots.txt {
- add_header Content-Type text/plain;
- alias /home/monitorsky/static_root/txt/robots.txt;
- }
- location /static/video/ {
- mp4;
- mp4_buffer_size 1m;
- mp4_max_buffer_size 20m;
- alias /home/monitorsky/static_root/video/;
- }
- location /static/{
- alias /home/monitorsky/static_root/;
- }
- location /media/ {
- alias /home/monitorsky/media/;
- }
- location /{
- if (!-f /var/run/uwsgi/app/monitorsky/pid) {
- return 503;
- }
- if ($http_user_agent ~* (SkypeUriPreview) ) {
- return 444;
- }
- include uwsgi_params;
- uwsgi_pass unix:///var/run/uwsgi/app/monitorsky/socket;
- uwsgi_param HTTP_X_FORWARDED_PROTOCOL $scheme;
- }
- include ssl_params;
- error_page 500 501 502 503 504 /500/;
- #error_page 503 @maintenance;
- #location @maintenance {
- # root /home/;
- # rewrite ^(.*)$ /maintenance.html break;
- #}
- }
- server {
- listen 80;
- server_name www.monitorsky.com;
- location ~ /.well-known {
- allow all;
- }
- location / {
- return 301 https://monitorsky.com$request_uri;
- }
- }
- server {
- listen 443 ssl;
- server_name www.monitorsky.com;
- include ssl_params;
- return 301 https://monitorsky.com$request_uri;
- }
- server {
- listen 80;
- server_name monitorsky.com;
- location ~ /.well-known {
- allow all;
- }
- location / {
- return 301 https://monitorsky.com$request_uri;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement