vagrant - nginx: configuration file /etc/nginx/nginx.conf test failed (host not found in upstream) -
I have a charge box that is working fine for a while and I would get it again for some reasons When I try to restart Nginx
nginx: [emerg] Host was not found in upstream "//myclass.com.192.168.33.10.xip.io" in /etc/nginx/conf.d/myclass.com .conf : 19 nginx: configuration file /etc/nginx/nginx.conf test failed
I have not changed anything as much as I know (unless Windows Update has done some strange thing )
Can anyone suggest how NGNC works again & amp; Allows me to restart the nginx service - it will appear that I can not ping the host ... any ideas why?
Here is my NGN conf file:
- Update - Run to see if port 80 is on .. (reading another similar post) and I I can see that the varnish daemon is on port 80. Is this the cause of the problem ?? Any advice will be welcome because I am new to this stuff.
sudo netstat -tlnp | Grep 80
My myclass.com.conf file
server {80; Server_name class.com. * Www.class.com *; Root /vagrant/www.class.com/public_html; Index index.php; Access_log /vagrant/log/class.com.access.log; Error_log /vagrant/log/class.com.error.log Error; Charset UTF-8; Location = / favicon.ico {log_note_foundoff; Access_log off; } Location = /robots.txt {access_log off; Log_not_found off; } Error_page 404 / index.php; Place /socket.io {proxy_pass http://www.class.com.192.168.33.10.xip.io:8055; Upgrade Proxy_set_header $ http_upgrade; Proxy_set_header connection "upgrade"; Proxy_ http_version 1.1; } Location / {try_files $ uri $ uri / @handler; 30d expired; } place /. {Return 404; } Place @ handler {rewrite / endex.php final; } Location ~ .php / {rewrite ^ (. * .php) / $ 1 last; } Location ~ \ .php $ {try_files $ uri = 404; Finished; Fastcgi_read_timeout 900; Fastcgi_index index.php; Fastcgi_pass 127.0.0.1:9000; Fastcgi_param SCRIPT_FILENAME $ document_root $ fastcgi_script_name; Fastcgi_param CLASS_ENVIRONMENT LYLE; Include /etc/nginx/fastcgi_params; } On Gzip; Gzip_min_length 1000; Any gzip_proxied; Gzip_types Text / Plain App / XML Text / CSS Text / JS Application / X-Javascript; Send file off;
}
resolver 8.8.8.8 valid = 300s; Resolver_timeout 10s;
Google DNS (8.8.8.8) can solve it, but the solution of this internal address comes under the Network Class C.
$ dig @ 8.8.8.8 Www.class.com.192.168.33.10.xip.io ;; Answer section: www.class.com.192.168.33.10.xip.io In 29 9 a 19.6868.33.10
Comments
Post a Comment