Home  >  Q&A  >  body text

How to use Nginx built-in variables. Why is this thing I wrote not feasible?

access_log  /var/log/nginx/${server_name}-access.log;
error_log   /var/log/nginx/$server_name-error.log error;
黄舟黄舟2713 days ago399

reply all(1)I'll reply

  • 巴扎黑

    巴扎黑2017-05-16 17:25:23

    Just remove the curly braces
    For example
    access_log /var/log/nginx/$server_name-access.log;

    reply
    0
  • Cancelreply