zoukankan      html  css  js  c++  java
  • nginx 服务器配置虚拟域名

    1.修改配置文件nginx.conf,添加:

    include vhost/*.conf;

    2.创建vhost目录,并在下面创建虚拟机配置文件web1.conf。

    mkdir vhost && cd vhost

    web1.conf 内容如下:

    server{
            listen 80;
            server_name  crm6api.credithc.com;
            #include /opt/www/crm6api/public/.htaccess;
          
        
         #配置访问域名可省略index.php location
    / { index index.html index.htm index.php; #autoindex on; if ($request_filename !~ (static|robots/.txt|index/.php.*)) { rewrite ^/(.*)$ /index.php?$1 last; break; } } location ~ .php(.*)$ { root /opt/www/crm6api/public; #index index.php index.html index.htm fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; #fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }

    3.windows修改配置文件hosts,并测试是否可访问。

    10.100.110.110 web1.com
  • 相关阅读:
    day05 集合
    day05 判断敏感字符
    day05 None类型
    day05 字典
    day04元组
    day04列表
    HDFS配额管理(实战)
    hive数据库的哪些函数操作是否走MR
    oracle 裸设备划分 --centos6.5
    redis3.0.7集群部署手册
  • 原文地址:https://www.cnblogs.com/wjs2019/p/15308618.html
Copyright © 2011-2022 走看看