zoukankan      html  css  js  c++  java
  • 设置nginx支持虚拟机,支持多域名多网站

    编辑nginx.conf 文件 调整http

    http {

    #第一域名站

          server {

                        listen 80; 

                        server_name www.domain1.com;

                        access_log logs/domain1.access.log main;

                      location / {

                              index index.php index.html index.htm;

                                root /var/www/domain1.com/htdocs;

                      }

                   location ~.php$ {

                          root /var/www/domain1.com/htdocs;

            fastcgi_pass 127.0.0.1:9000;

                          fastcgi_index index.php;

            fastcgi_param SCRIPT_NAME scripts_path$fastcgi_script_name;

                           include fastcgi_params;

                    }

         }

     server { listen 80;#设置侦听的端口 server_name www.host2.com host2.com; //域名 access_log logs/host2.access.log main; //错误日志 location / { index index.php index.html;//首页索引文件 root /var/www/host2/; //网站根目录 } } }

  • 相关阅读:
    2019-2020-1 20175315 20175322 20175334 实验五 通讯协议设计
    bfs思路总结
    蓝桥杯-带分数
    Passive WiFi Tracking
    openWRT刷机设置
    研究生若干事
    Dijkstra算法和Floyed算法
    最小生成树prim算法
    无穷大量0x3f3f3f3f
    杭电OJ题目分类
  • 原文地址:https://www.cnblogs.com/phplhs/p/4138519.html
Copyright © 2011-2022 走看看