1

I know this is probably something dead simple but I'm not exactly a pro at Nginx or Linux yet.

I have a Wordpress MU network configured for port 80 (I can access this on my.site on the LAN)

I have phpmyadmin on port 80 in my /etc/hosts to go to http://phpmyadmin so it is only accessible on the local machine

Emby Server was also installed to go to port 8096 (I can access this LAN or WAN) Webmin is installed on port 10000 (I can access this LAN and WAN)

If I go to my.site from WAN the emby-server page comes up where the WP site should be. If I uninstall emby-server then I get ERR_CONNECTION_REFUSED

however if I access my.site from INSIDE my network the wordpress site loads up regardless of emby being installed or not.

addtional info

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;
        }
}

requested info

$ 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 Answers1

0

I have NO IDEA why but adding a firewall rule for 8096 resolved the issue.

I can now access my WP install on my.site and my mediabrowser on my.site:8096