zoukankan      html  css  js  c++  java
  • nginx配置虚拟域名以及代理

    server {

    listen 80;#监听80端口
    server_name www.basic.com;#虚拟域名
    root "D:/WWW/basic";#虚拟域名指向目录
    location / {
    index index.html index.htm index.php l.php;#autoindex当成首页的文件
    autoindex on;
    }

    //配置php解析器,要不然它会把php后缀的文件当成一个静态文件下载

    location ~ .php(.*)$ {
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_split_path_info ^((?U).+.php)(/?.+)$;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
    include fastcgi_params;
    }

    //代理设置

    location /aaa{
    access_log on;
    rewrite ^/httk-admin/(.*?)$ /$1 break; #如果是访问/httk-admin/下  则代理到下面地址
    proxy_pass http://********/aaa/$1?$query_string;
    }
    }

  • 相关阅读:
    React
    移动端
    Flask 框架小记
    PyTorch 学习
    CNN 小结
    Django 环境下常用的模型设计
    Linux用户和用户组
    Linux下查看进程的命令输出的内容解释
    linux下配置tomcat开机自启动
    商业智能概述
  • 原文地址:https://www.cnblogs.com/tudou1223/p/4502989.html
Copyright © 2011-2022 走看看