Home  >  Q&A  >  body text

I installed nginx under opt/nginx and could not find the folder etc/nginx/conf.d

Where can I find it?

为情所困为情所困2712 days ago668

reply all(1)I'll reply

  • phpcn_u1582

    phpcn_u15822017-05-16 17:31:50

    The default configuration file of Nginx is in nginx/conf/nginx.conf. The path of /etc/nginx/conf.d needs to be created by yourself.
    If you need to place the main configuration nginx.conf in another location, you can specify it with the -c parameter when starting nginx

    sudo /opt/nginx/sbin/ngixn -c /etc/nginx/conf.d/nginx.conf

    If the main configuration is still the default and you just want to see some sub-configurations under conf.d, you can use the include command in nginx.conf

    include /etc/nginx/conf.d/*.conf

    reply
    0
  • Cancelreply