2
I'm trying to configure gitlab running in an Ubuntu 12.04 guest with Windows7 host. I can ssh the guest using port-forwarding and access the nginx server using port redirection (8888 in host is 80 in guest, so localhost:8888 in host gets to the nginx server in the guest), but the server_name in nginx configuration file is giving me trouble. What is the correct listen and server_name that nginx would accept?
The guest has the NAT interface at 10.0.2.15 and Host-Only interface at 192.168.56.101, static.
Thanks!
EDIT: Because the host uses a static ip address I can't use bridged mode for the Ubuntu guest, so I have to stick with Host-Only and Port Forwarding. With this I can access the nginx server in the guest, but server_name is still wrong, as I have to use localhost:8888 in the Windows host and forward it to port 80 in the guest. What should be server_name?
1I think this works because you have defined it as
listen 80 default;
(without servername and with default). This way nginx will answer to anything that come on its port 80. If you intend to run other sites on the future using this nginx instance you will have to define them differently but for now it works! ;) – laurent – 2012-12-14T16:57:01.6201Off topic, but Laurent helped you solve the problem and you posted your own answer and accepted your answer? I think you should have edited your question and included the resolution and marked his answer as accepted. Seems kind of odd to have someone help you and then accept the points yourself ... – Bryan Ray – 2013-08-22T20:14:27.673