I use nginx as reverse proxy for apache wordpress site. But I cannot access word.com frontend page if I comment out the proxy_set_header part, it just redirect to 127.0.0.1 in my brower. Who can explain it for me? Nginx settings:
server {
listen 80 default_server;
server_name word.com
charset utf-8;
index index.htm index.html;
access_log /var/log/nginx/word-access.log main;
error_log /var/log/nginx/word-error.log;
location / {
proxy_pass http://127.0.0.1:8080;
}
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}