Home  >  Q&A  >  body text

What is the difference between sites-available and sites-enabled in nginx?

Which one should I usually change when modifying the configuration? I want to change the configuration of connecting to php

phpcn_u1582phpcn_u15822687 days ago1242

reply all(1)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-06-10 09:51:31

      If you are coming from Apache, the "sites-available" and "sites-enabled" 
    directories will be familiar.
    
      These directories are used to define configurations for your websites. 
    Files are generally created in the "sites-available" directory, and then
    symbolically linked to the "sites-enabled" directory when they are ready 
    to go live.
    
    ...
    
    In the "nginx.conf" file, we can see that the end of the "http" block has:
    
        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
    

    How To Configure Nginx

    sites-available stores the current server configuration, modify it here

    sites-enabled is the server configuration that is activated and used (create a shortcut from the files of sites_available to sites-enabled)

    reply
    0
  • Cancelreply