Ahojte, neviem preco ale blbne mi na VPSku nginx konfiguracia a presmeruva z httpS://www.foo.bar na http://www.foo.bar a stale dookola.
Kód:server { listen 80; server_name foo.bar www.foo.bar; location / { return 301 https://www.foo.bar$request_uri; } } server { listen 443 ssl; server_name foo.bar; ssl_certificate /foobar.cert; ssl_certificate_key /foobar.key; location / { return 301 $scheme://www.foo.bar$request_uri; } } server { listen 443 ssl; server_name www.foo.bar; ssl_certificate /foobar.cert; ssl_certificate_key /foobar.key; root /var/www/html/foobar; index index.php; location / { try_files $uri $uri/ @cleanurl; } location ~ ^/robots.txt { add_header Cache-Control max-age=86000; access_log off; } location /favicon.ico { add_header Cache-Control max-age=86000; access_log off; log_not_found off; } location ~* \.(css|js)$ { access_log off; try_files $uri $uri/ @cleanurl; } location ~* \.(eot|ttf|woff|woff2|otf|svg)$ { add_header 'Access-Control-Allow-Origin' '*'; expires -1; access_log off; try_files $uri $uri/ @cleanurl; } location ~* \.(svgz)$ { expires -1; add_header Content-Encoding gzip; gzip off; access_log off; try_files $uri $uri/ @cleanurl; } location ~ (^|/)\. { deny all; } location ~ \.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock))$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$ { deny all; } location ~ ^/files/([-a-z0-9])*/config/ { deny all; } location @cleanurl { rewrite ^/(.*)$ /index.php last; } location ~ \.php(/|$) { try_files @cleanurl =404; } location = /index.php { include fastcgi.conf; fastcgi_index index.php; fastcgi_pass localhost:9000; fastcgi_keep_conn on; fastcgi_param HTTP_PROXY ''; fastcgi_split_path_info ^(.+?\.php)(/.+)$; } }