重新启动计算机后,无法连接到VM ​​VirtualBox Linux Nginx服务器 [英] Cannot connect to VM VirtualBox Linux Nginx server after restarting my computer

查看:85
本文介绍了重新启动计算机后,无法连接到VM ​​VirtualBox Linux Nginx服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近设置了一个运行nginx的Ubuntu 12.04 LTS服务器,并且可以通过其IP地址连接到它。但是,重新启动计算机后,我无法再使用任何浏览器连接到服务器,但是可以通过puTTy通过SSH连接。不知道发生了什么,ifconfig显示IP地址没有更改,并且我没有更改服务器上的设置。如何解决此问题?

I recently setup an Ubuntu 12.04 LTS server running nginx, and I could connect to it via its IP address. However, after restarting my computer I can no longer connect to the server in any browser but I can connect via SSH through puTTy. No clue what's going on and ifconfig shows that the IP address has not changed and I changed no settings on the server. How can I fix this?

此图显示了我尝试访问服务器时的Chrome窗口响应,服务器上的ifconfig(右上),网络设置VM(左下方)以及/ etc / nginx / sites-available / www的位置设置。

This picture shows the chrome window response when I try to access the server, the ifconfig from the server (top right), the network settings on the VM (bottom left), and the location settings for /etc/nginx/sites-available/www.

服务器设置

我尝试重新启动,重新加载nginx并完全重新启动计算机。到目前为止没有任何工作。

I have tried restarting, doing an nginx reload, and a full computer restart. Nothing has worked so far. All help is greatly appreciated!

推荐答案

首先请确保该服务正在使用 sudo服务nginx状态运行

First make sure that the service is working using sudo service nginx status

如果未运行,请尝试手动启动 sudo服务nginx start

If it's not running try starting it manually sudo service nginx start

如果无法启动,则可以在 /var/log/nginx/error.log 中检查错误日志服务器配置中定义的其他错误日志。

If it fails to start, you can check the error log in /var/log/nginx/error.log or any other error log defined in the server config.

这篇关于重新启动计算机后,无法连接到VM ​​VirtualBox Linux Nginx服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆