yii2 - Nginx "Server not found" while no network connection -


i'm using lemp stack on ubuntu 14.04 , have trouble nginx/1.10.0., when have no network connection can't reach local sites see "server not found", there thing interesting localhost site still works fine in network state. have 5 local sites stock localhost works perfect in network state. try many settings combination of nginx, hosts file, rename site directory, given permissions www folder nothing helps, don't know else. notice if visit site while i'm online can use site while after go offline, if open browser console , set mode "no cache" in same second loosing connection site , see again "server not found", , last, in mode of networking off/lan/wlan local site address pings good, there no trouble. there no error message in logs, perfect clear. config files same sites, here is.

my localhost nginx file

    server {     charset utf-8;     client_max_body_size 128m;      listen 80; ## listen ipv4     #listen [::]:80 default_server ipv6only=on; ## listen ipv6      server_name localhost www.localhost;     root        /home/arthur/www/localhost;     index       index.php index.html index.htm;      location / {         # redirect isn't real file index.php         try_files $uri $uri/ /index.php?$args;     }      # uncomment avoid processing of calls non-existing static files yii     #location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {     #    try_files $uri =404;     #}     #error_page 404 /404.html;      location ~ \.php$ {         include fastcgi_params;         fastcgi_param script_filename $document_root/$fastcgi_script_name;         #fastcgi_pass   127.0.0.1:9000;         fastcgi_pass unix:/var/run/php5-fpm.sock;         try_files $uri =404;     }      location ~ /\.(ht|svn|git) {         deny all;     } } 

my iamma.s nginx file

    server {     charset utf-8;     client_max_body_size 128m;      listen 80; ## listen ipv4     #listen [::]:80 default_server ipv6only=on; ## listen ipv6      server_name iamma.s www.iamma.s;     root        /home/arthur/www/iamma.s/web;     index       index.php index.html index.htm;      location / {         # redirect isn't real file index.php         try_files $uri $uri/ /index.php?$args;     }      # uncomment avoid processing of calls non-existing static files yii     #location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {     #    try_files $uri =404;     #}     #error_page 404 /404.html;      location ~ \.php$ {         include fastcgi_params;         fastcgi_param script_filename $document_root/$fastcgi_script_name;         #fastcgi_pass   127.0.0.1:9000;         fastcgi_pass unix:/var/run/php5-fpm.sock;         try_files $uri =404;     }      location ~ /\.(ht|svn|git) {         deny all;     } } 

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

hosts file

127.0.0.1   localhost 127.0.1.1   arthur-probook 127.0.0.1   phpmyadmin 127.0.0.1   my.s 127.0.0.1   iamma.s 127.0.0.1   www.iamma.s 127.0.0.1   inv.s 127.0.0.1   www.phpmyadmin 127.0.0.1   www.my.s 127.0.0.1   www.inv.s  # following lines desirable ipv6 capable hosts ::1     ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -