For Ex:
If I have nginx.conf file as follow:
http {
#use epoll;
server {
server_name abc.com;
listen 443;
if ($host = abc.com) {
return 404;
}
location ~ /hello/ {
proxy_set_header X-Real-IP $remote_addr;
}
}
}
When I load that file and copied into another directory, it drops parenthesis and also changes structure.
http {
#use epoll;
server {
server_name abc.com;
listen 443;
if $host = abc.com {
return 404;
{
if $host=abc.com {
location ~ /hello/ {
proxy_set_header X-Real-IP $remote_addr;
}
}
}
For Ex:
If I have nginx.conf file as follow:
http {
#use epoll;
server {
server_name abc.com;
listen 443;
if ($host = abc.com) {
return 404;
}
location ~ /hello/ {
proxy_set_header X-Real-IP $remote_addr;
}
}
}
When I load that file and copied into another directory, it drops parenthesis and also changes structure.
http {
#use epoll;
server {
server_name abc.com;
listen 443;
if $host = abc.com {
return 404;
{
if $host=abc.com {
location ~ /hello/ {
proxy_set_header X-Real-IP $remote_addr;
}
}
}