V
V
VladlenZ2014-05-05 20:24:50
Nginx
VladlenZ, 2014-05-05 20:24:50

The site does not open on the host system

Mac OS is used as the host system. The virtualization environment is VirtualBox and of course I use Vagrant. A Drupal 7 project is deployed on Ubuntu 12.04 guest OS. Nginx is used as a web server. Port forwarded (config.vm.network "forwarded_port", guest: 80, host: 8080). However, when trying to navigate to localhost:8080 , the site is not displayed: "error: Server not found". But this issue occurs when using the "NAT" network connection type. By changing the connection type to "Network bridge" and setting /etc/hosts accordingly, everything starts working. But this is inconvenient, because when you switch to another network, you have to change /etc/hosts again.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vlad Zhivotnev, 2014-05-05
@VladlenZ

As the host IP (third column) you need to specify 127.0.0.1

V
VladlenZ, 2014-05-07
@VladlenZ

The trouble was here:
server {
listen 80;
server_name *.test.server.dom;
rewrite ^(.*)$ http://test.server.dom$1 permanent;
}
When transferring the config, I completely forgot to delete this piece. She is so careless =(
Well, of course, thanks to @inkvizitor68sl for contributing to the solution of the problem.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question