Connecting to localhost or 127.0.0.1 pain

Hi,

I’m having terrible pains trying to connect a server application to
another localhost server application.

app1 connects to app2 using http://localhost but nginx doesn’t seem to
understand the request.

Should I add localhost to the server_name???

Regards,

app1 connects to app2 using http://localhost but nginx
doesn’t seem to
understand the request.

Should I add localhost to the server_name???

yes, that would maybe help.

alternatively add “default” to the server_name.

hth

Should I add localhost to the server_name???

yes, that would maybe help.

alternatively add “default” to the server_name.
Thanks :slight_smile:

Hello!

On Sat, Mar 20, 2010 at 01:16:28PM +0100, Alexander Vogt wrote:

app1 connects to app2 using http://localhost but nginx doesn’t
seem to
understand the request.

Should I add localhost to the server_name???

yes, that would maybe help.

alternatively add “default” to the server_name.

s/server_name/listen/.

Adding “default” to the server_name does nothing, it just adds
another server alias “default”.

More details may be found here:

http://nginx.org/en/docs/http/server_names.html

Maxim D.

alternatively add “default” to the server_name.

s/server_name/listen/.

Adding “default” to the server_name does nothing, it
just adds
another server alias “default”.

indeed, sorry for confusion.

server {
listen 127.0.0.1:80 default;
server_name localhost;

}

is the correct config then.

rolls eyes
:wink:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs