S
S
sandrain2014-04-15 17:17:53
Nginx
sandrain, 2014-04-15 17:17:53

Nginx no resolver defined to resolve domain.com - what's wrong?

I want to make a proxy for the mobile version

server {
        listen 80;
        server_name m.domain.com;
        location / {
                proxy_pass http://domain.com/mobile/$request_uri;
        }
}

In the logs I get no resolver defined to resolve domain.com.
A friend has this configuration.
What can be wrong?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vlad Zhivotnev, 2014-04-15
@inkvizitor68sl

Either write
Or (if you don't trust Google):
Well, the most correct thing is to register the ip address instead of domain.com and pass the Host header to the backend:
proxy_set_header Host $host;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question