New answers tagged

2 votes
Accepted

Which Nginx modules should be removed when building a reverse proxy server?

Unless there is a really good reason to do so, I would not recommend compiling Nginx from source. It is better to install from a repo and figure out what settings and config values in Nginx you can ...
0 votes

Use nginx to serve SSH on different virtual server than HTTP(S)

Based on your latest comment it appears that you want to do the split of the traffic at a very early stage, directly at connection establishment. At that point, the receiving server has no information ...
  • 671
2 votes

How to use global variables like $host in included file?

From Using Environment Variables in Nginx Config File: nginx.conf contains config related to our Nginx server. The Nginx config doesn’t support environment variables out of the box. However, there ...
  • 437k
2 votes
Accepted

What's exact diff between `=` and `^~` Nginx modifiers?

As far as I've read/understood, both = and ^~ are normal string prefix modifier (neither is 'reg-exp' modifiers). = is exact matching, and not prefix matching at all ^~ is a "prioritized" ...
1 vote

What's exact diff between `=` and `^~` Nginx modifiers?

UPDATE Thanks to @danila-vershinin pointing this out, but = actually do not define a prefix but only an exact match. See his answer for a more complete/correct answer. Original Answer below If you ...
  • 671
0 votes

When I reloaded the NGINX with acontainer, I got the open() '/var/run/nginx.pid' failed (2: No such file or directory)

Easy way to fix this problem ### relocation  nginx.conf nginx -c /etc/nginx/nginx.conf
  • 908
0 votes
Accepted

A few doubtful nginx directives are confusing me

What if there are 2 non-regexp location blocks: having /t and /s and user types /f, then which location would be served, and under what logic? Neither of them, as they don't match the input. When no ...
  • 407k

Top 50 recent answers are included