Назад | Перейти на главную страницу

nginx отказывается подключаться к wordpress

У меня есть сервер nginx 1.15.3 на ubuntu 18.04 LTS, и я пытаюсь обслуживать контент, являющийся либо веб-страницей, либо видео, используя различные плагины на моем сайте wordpress, который полностью находится на другом сервере / IP. Однако, когда я пытаюсь использовать расширенный модуль iframe на этом веб-сайте, чтобы вытащить веб-страницу, на которой есть только видеопоток (здесь он работал: http://www.tinywebgallery.com/blog/advanced-iframe/free-iframe-checker), он говорит, что IP-адрес сервера nginx отказался подключиться, и это также относится к любому другому типу подключения, которое я пытаюсь установить, или если я пытаюсь вытащить любой из нужных мне видеопотоков. Что бы ни происходило, связано с тем, как nginx взаимодействует с wordpress или наоборот, я действительно не уверен. Версия wordpress на другом сервере - 4.9.8, поэтому все должно быть в актуальном состоянии.

Вот мой nginx.conf:

worker_processes  auto;
events {
worker_connections  1024;
}

# RTMP configuration
rtmp {
server {
    listen 1935; # Listen on standard RTMP port
    chunk_size 4096;

    application show1 {
        live on;
        # Turn on HLS
        hls on;
        hls_path /mnt/hls1/;
        hls_fragment 3;
        hls_playlist_length 60;
    }
application show2 {
        live on;
        # Turn on HLS
        hls on;
        hls_path /mnt/hls2/;
        hls_fragment 3;
        hls_playlist_length 60;
    }
application show3 {
        live on;
        # Turn on HLS
        hls on;
        hls_path /mnt/hls3/;
        hls_fragment 3;
        hls_playlist_length 60;
    }
application show4 {
        live on;
        # Turn on HLS
        hls on;
        hls_path /mnt/hls4/;
        hls_fragment 3;
        hls_playlist_length 60;
    }
application show5 {
        live on;
        # Turn on HLS
        hls on;
        hls_path /mnt/hls5/;
        hls_fragment 3;
        hls_playlist_length 60;
    }
application show6 {
        live on;
        # Turn on HLS
        hls on;
        hls_path /mnt/hls6/;
        hls_fragment 3;
        hls_playlist_length 60;
    }
application show7 {
        live on;
        # Turn on HLS
        hls on;
        hls_path /mnt/hls7/;
        hls_fragment 3;
        hls_playlist_length 60;
    }
    application cam01 {
        live on;
        record off;
    }
application cam02 {
        live on;
        record off;
    }
application cam03 {
        live on;
        record off;
    }
application cam04 {
        live on;
        record off;
    }
application cam05 {
        live on;
        record off;
    }
application cam06 {
        live on;
        record off;
    }
application cam07 {
        live on;
        record off;
    }
}
}

http {
sendfile off;
tcp_nopush on;
default_type application/octet-stream;

server {
    listen 80;
    server_name localhost;
    location / {
        # Disable cache
        add_header 'Cache-Control' 'no-cache';

        # CORS setup
        add_header 'Access-Control-Allow-Origin' '*' always;
        add_header 'Access-Control-Expose-Headers' 'Content-Length';

        # allow CORS preflight requests
        if ($request_method = 'OPTIONS') {
            add_header 'Access-Control-Allow-Origin' '*';
            add_header 'Access-Control-Max-Age' 1728000;
            add_header 'Content-Type' 'text/plain charset=UTF-8';
            add_header 'Content-Length' 0;
            return 204;
        }

        types {
            application/dash+xml mpd;
            application/vnd.apple.mpegurl m3u8;
            video/mp2t ts;
        }

        root /mnt/;
        location /index.html {
            default_type "text/html";
        }
        location /testing.html {
            default_type "text/html";
        }
        location /test.html {
            default_type "text/html";
        }
    location /cam01.html {
            default_type "text/html";
        }
    location /cam02.html {
            default_type "text/html";
        }
    location /cam03.html {
            default_type "text/html";
        }
    location /cam04.html {
            default_type "text/html";
        }
    location /cam05.html {
            default_type "text/html";
        }
    location /cam06.html {
            default_type "text/html";
        }
    location /cam07.html {
            default_type "text/html";
        }
    }
}
}

Я все еще новичок в wordpress, nginx и serverfault, поэтому, если потребуется дополнительная информация, не стесняйтесь спрашивать, и я предоставлю. Любая помощь будет принята с благодарностью, спасибо.

Хорошо, поэтому прислушайтесь к совету Майкла Хэмптона, чтобы проверить веб-консоль на наличие ошибок на веб-странице. Я обнаружил, что nginx обслуживает все через http, а не https, в то время как я запрашивал сайт wordpress в https, вызывая какую-то ошибку смешанного содержимого, вероятно, не помогло то, как я использую https везде. Запрос веб-страницы в обычном http позволяет содержимому загружаться нормально. Спасибо за помощь!