Safari 无法打开我的网站的 http 链接

Safari 无法打开我的网站的 http 链接

因此,我有一个基本的 Nginx 配置,可以将对我的网站的任何请求重定向到 www 和 HTTPS:

server {
    listen 80;
    listen [::]:80;
    server_name www.goodjobs.ro goodjobs.ro;
    return 301 https://www.goodjobs.ro$request_uri;
}

server {
    listen 443 ssl;
    ssl_certificate hidden/path;
    ssl_certificate_key hidden/path;
    server_name goodjobs.ro;
    return 301 https://www.goodjobs.ro$request_uri;
}


server {
        server_name goodjobs.ro www.goodjobs.ro;
        listen 93.188.166.124 http2;
        listen 93.188.166.124:443 ssl http2;
        root /home/goodjobs/public_html;
        index index.php index.htm index.html;
        location ^~ /.well-known/ {
                try_files $uri /;
        }
        location / {
                proxy_pass http://localhost:3000;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection 'upgrade';
                proxy_set_header Host $host;
                proxy_cache_bypass $http_upgrade;
        }
        ssl_certificate hidden/path;
        ssl_certificate_key hidden/path;
}

nginx.conf

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
        worker_connections 768;
        # multi_accept on;
}

http {

        ##
        # Basic Settings
        ##

        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        # server_tokens off;
 
        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;
 
        include /etc/nginx/mime.types;
        default_type application/octet-stream;
 
        ##
        # SSL Settings
        ##
 
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
        ssl_prefer_server_ciphers on;
 
        ##
        # Logging Settings
        ##
 
        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;
 
        ##
        # Gzip Settings
        ##
 
        gzip on;
 
        # gzip_vary on;
        # gzip_proxied any;
        # gzip_comp_level 6;
        # gzip_buffers 16 8k;
        # gzip_http_version 1.1;
        # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
 
        ##
        # Virtual Host Configs
        ##
 
        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
        server_names_hash_bucket_size 64;
}

在 Chrome 上,它运行完美,但在 Safari 上,它却不行

Safari 上的行为:

如果我正常输入 URL 或使用 http://,网站将无法运行。但如果我使用 https:// 输入,网站将加载

我的理论是 safari 没有获得 http 重定向(第一个服务器块)

Chrome 和 Mozilla 也得到了它

相关内容