admin管理员组

文章数量:1631139

进入conf文件夹,新建vhost文件夹;
将内部的server配置段提取单独放在一个文件里,存到了conf/vhost下,以方便配置多个虚拟主机。
并在nginx.conf里http配置段内添加了一行 include vhost/*.conf;用来读取vhost下的虚拟主机配置。

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    include vhost/*.conf;  #新增

配置主机:
进入vhost文件,新建一个mall.conf(你自己想取的名字)文件。

server {
        listen       80;
        server_name  mall.me; #可添加多个,多个之间“空格”分开

        #autoindex on;#打开目录浏览,这样当没有找到index

本文标签: 域名WindowsNginx