# Настройка virtualhost без авторизации и upstream ```nginx server { listen 80; listen 443 ssl; include /etc/nginx/conf.d/generic/ssl.cfg; ssl_certificate /run/secrets/cloudflare-origin.crt; ssl_certificate_key /run/secrets/cloudflare-origin.key; server_name catch.appworks.ru; set $host_header "catch.appworks.ru"; if ($scheme = http) { return 301 https://$host_header$request_uri; } charset utf-8; access_log /var/log/nginx/access_log-$host_header; add_header 'Access-Control-Allow-Origin' '*' always; add_header 'Access-Control-Allow-Credentials' 'true' always; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always; add_header 'Access-Control-Allow-Headers' 'Authorization, Accept, Accept-Charset, X-Requested-With, User-Agent, Cache-Control, Content-Type, Content-Length, Content-Range, If-Modified-Since, x-language' always; add_header 'Access-Control-Max-Age' 3600 always; root /var/www; location / { proxy_pass http://127.0.0.1:4440/; } location ~* (\.(bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist|git|.docker.config)|~)$ {return 418;} } ```