порт 80 перенаправляется, недоступен, кроме как в локальной сети

Я знаю, что это, вероятно, что-то очень простое, но я не совсем профессионал в Nginx или Linux пока нет. поэтому он доступен только на локальном компьютере

Emby Server также был установлен для перехода на порт 8096 (я могу получить доступ к этой LAN или WAN) Webmin установлен на порт 10000 (я могу получить доступ к этой LAN и WAN)

Если я перейду на my.site из WAN, страница emby-сервера появится там, где должен быть сайт WP. Если я удалю emby-сервер, то получу ERR_CONNECTION_REFUSED

, однако, если я захожу на my.site из ВНУТРИ моей сети, сайт wordpress загружается независимо от того, установлен ли emby или нет.

дополнительная информация

nginx.conf

user www-data;
worker_processes auto;
pid /run/nginx.pid;

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; # 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_disable "msie6";

    # 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/*;
}

# nginx configuration
#location / {
#rewrite ^/([_0-9a-zA-Z- ]+/)?wp-admin$ /$1wp-admin/ redirect;
#if (-e $request_filename){
#rewrite ^/([_0-9a-zA-Z- ]+/)?(wp-(content|admin|includes.*) /$2 break;
#}
#rewrite ^/([_0-9a-zA-Z- ]+/)?(.*\.php$ /$2 break;
#rewrite ^(.*)$ /index.php break;
#}

#mail {
#   # See sample authentication script at:
#   # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
# 
#   # auth_http localhost/auth.php;
#   # pop3_capabilities "TOP" "USER";
#   # imap_capabilities "IMAP4rev1" "UIDPLUS";
# 
#   server {
#       listen     localhost:110;
#       protocol   pop3;
#       proxy      on;
#   }
# 
#   server {
#       listen     localhost:143;
#       protocol   imap;
#       proxy      on;
#   }
#}

/ etc / nginx / sites-enabled / default

server {
        listen       80;
        server_name  my.site;
        root /var/www/my.site/public/;

        location / {
                try_files $uri $uri/ =404;
    }

        index index.php index.html;
        error_page 404 /404.html;
        error_page 500 502 503 504 /50x.html;

        location = /50x.html {
                root /var/www/html;
        }

        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
        }
}
server {
        listen       80;
        server_name  phpmyadmin;
        root /usr/share/phpmyadmin/;
        index index.php index.html;

        location / {
                try_files $uri $uri/ =404;
        }

        error_page 404 /404.html;
        error_page 500 502 503 504 /50x.html;

        location = /50x.html {
                root /var/www/html;
        }

        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
        }
}

запрошенная информация

$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target   prot opt source     destination

Chain FORWARD (policy ACCEPT)
target   prot opt source     destination

Chain OUTPUT (policy ACCEPT)
target   prot opt source     destination
$
1
задан 21 December 2015 в 04:19
1 ответ

У меня нет IDEA, почему, но добавление правила брандмауэра для 8096 решило проблему.

Теперь я могу получить доступ к моей установке WP на my.site и к моему посредническому браузеру на my.site:8096

.
0
ответ дан 4 December 2019 в 06:44

Теги

Похожие вопросы