nginx里面的sites-available和sites-enabled有什么区别

查看:1790
本文介绍了nginx里面的sites-available和sites-enabled有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问 题

一般修改配置改哪个的呢?我想改和php连接的配置

解决方案

  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是存放当前的server配置, 在这里修改

sites-enabled是激活并使用的server配置(从sites_available的文件创建快捷方式到sites-enabled)

这篇关于nginx里面的sites-available和sites-enabled有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆