简体   繁体   中英

How to access nginx server from host machine, installed on guest VM ?

Host Machine - Win 7

Guest - Fedora

I have installed nginx web server on guest fedora machine and I can access the webpage inside guest machine using the interface address. How can I access the web page from host machine's browser ?

I am using bridged connection.

Router is assigning 192.168.0.16 to the guest machine's interface. I tried same address in my host machine but it doesn't work.

Based on your description: First you should check your web application's config. You don't mention which type of your web application running on your Apache server, some are launched with the specific ip argment 127.0.0.1( or localhost), so kind of these web application can only be visited on your localhost computer. You should change the ip argument to 0.0.0.0 Second if the "Fisrt" failed, check the connection of the two server(host and your guest) by using telnet. On your Win7, you can use the command:

telnet ip port

for example:

telnet 192.168.0.16 80

80 is the default port of Apache Http(s) Server. if the command don't show the "connection refused" error, your Apache server is goood, so it might be something wrong of your web application. If that, show me your error msg then we go on further.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM