Answer the question
In order to leave comments, you need to log in
Nginx: listen to 2 ip at once?
Is it possible to listen to several ip at once. No redirects.
Let's say we have a config like this:
upstream example.com {
server unix:/tmp/example.com.sock fail_timeout=0;
}
server {
listen 127.0.0.1:80;
client_max_body_size 4G;
server_name example.com;
access_log /home/user/logs/example.com.access.log;
keepalive_timeout 5;
root /home/user/projects/example.com/;
location / {
proxy_pass http://example.com;
}
location = /robots.txt {
expires 30d;
add_header Cache-Control public;
try_files /robots.txt @shared;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question