修改window的host
C:\Windows\System32\drivers\etc

127.0.0.1       activate.navicat.com
127.0.0.1       test1.qyj.com
127.0.0.1       test2.qyj.com
127.0.0.1       car.qyj.com


#代表权限
#user  nobody;
user root;
#工作进程
worker_processes  1;#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;#pid        logs/nginx.pid;events {worker_connections  1024;
}#代表网络请求
http {#支持的文件类型include       mime.types;#流default_type  application/octet-stream;#log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '#                  '$status $body_bytes_sent "$http_referer" '#                  '"$http_user_agent" "$http_x_forwarded_for"';#access_log  logs/access.log  main;sendfile        on;#tcp_nopush     on;#keepalive_timeout  0;keepalive_timeout  65;#gzip  on;#负载均衡upstream car.qyj.com{server 127.0.0.1:9091;server 127.0.0.1:9092;server 127.0.0.1:9093;ip_hash;}#反向代理server{listen       80;server_name  car.qyj.com;location / {proxy_pass http://car.qyj.com/;}}#域名虚拟机(修改window的host<C:\Windows\System32\drivers\etc>)server{listen       80;server_name  test1.qyj.com;location / {root   test1;index  index.html;}}server{listen       80;server_name  test2.qyj.com;location / {root   test2;index  index.html;}}#test文件夹server{listen       8001;server_name  localhost;location / {root   test;index  index.html;}}#代表服务配置server {listen       80;#端口配置server_name  localhost;#服务名#charset koi8-r;#access_log  logs/host.access.log  main;#当用户访问http://ip:80/location / {root   html;#当匹配到/这个规则时指向nginx目录里面的/html文件夹index  index.html index.htm;#当访问不指定具体页面时默认显示的页面  类似web.xml的welcomefiles}#error_page  404              /404.html;# redirect server error pages to the static page /50x.html#error_page   500 502 503 504  /50x.html;#当服务器出现500的错时访问的页面location = /50x.html {root   html;}# proxy the PHP scripts to Apache listening on 127.0.0.1:80##location ~ \.php$ {#    proxy_pass   http://127.0.0.1;#}# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000##location ~ \.php$ {#    root           html;#    fastcgi_pass   127.0.0.1:9000;#    fastcgi_index  index.php;#    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;#    include        fastcgi_params;#}# deny access to .htaccess files, if Apache's document root# concurs with nginx's one##location ~ /\.ht {#    deny  all;#}}# another virtual host using mix of IP-, name-, and port-based configuration##server {#    listen       8000;#    listen       somename:8080;#    server_name  somename  alias  another.alias;#    location / {#        root   html;#        index  index.html index.htm;#    }#}# HTTPS server##server {#    listen       443 ssl;#    server_name  localhost;#    ssl_certificate      cert.pem;#    ssl_certificate_key  cert.key;#    ssl_session_cache    shared:SSL:1m;#    ssl_session_timeout  5m;#    ssl_ciphers  HIGH:!aNULL:!MD5;#    ssl_prefer_server_ciphers  on;#    location / {#        root   html;#        index  index.html index.htm;#    }#}}

https配置​​​​​​​​​​​​​​

    # HTTPS server#server {listen       443 ssl;server_name  www.ztejjx.com;ssl_certificate      1_www.xxx.com_bundle.crt;ssl_certificate_key  2_www.xxx.com.key;ssl_session_cache    shared:SSL:1m;ssl_session_timeout  5m;ssl_ciphers  HIGH:!aNULL:!MD5;ssl_prefer_server_ciphers  on;location / {root   html;index  index.html index.htm;proxy_pass http://127.0.0.1:8083;}}server {listen       443 ssl;server_name  inter.ztejjx.com;ssl_certificate      1_inter.xxx.com_bundle.crt;ssl_certificate_key  2_inter.xxx.com.key;ssl_session_cache    shared:SSL:1m;ssl_session_timeout  5m;ssl_ciphers  HIGH:!aNULL:!MD5;ssl_prefer_server_ciphers  on;location / {root   html;index  index.html index.htm;proxy_pass http://127.0.0.1:9093;}}server {listen       443 ssl;server_name  store.ztejjx.com;ssl_certificate      1_store.xxx.com_bundle.crt;ssl_certificate_key  2_store.xxx.com.key;ssl_session_cache    shared:SSL:1m;ssl_session_timeout  5m;ssl_ciphers  HIGH:!aNULL:!MD5;ssl_prefer_server_ciphers  on;location / {root   html;index  index.html index.htm;proxy_pass http://127.0.0.1:9094;}}

​​​​​​​

nginx配置文件 雷哥视频相关推荐

  1. 应用B站雷哥的在Centos7上安装fastdfs

    安装所需的软件都是在雷哥qq群下载的,这里就不发出来了 安装fastdfs需要分别安装fastdfs-nginx-module,fastdfs,nginx,libfastcommon 1,安装gcc( ...

  2. Nginx配置文件的结构详解和静态资源部署

    Nginx配置文件的结构详解和静态资源部署 一.配置文件结构 使用Nginx之前,需要先看懂Nginx的配置文件. 因为之后操作Nginx,就是一个对配置文件修改的过程. Nginx的配置文件(con ...

  3. 关于nginx配置文件中的root参数

    看了哔站up主:程序员鱼皮关于使用nginx部署网页的视频后,学着做之后发现:访问我的服务器的ip出来的是关于centos的网页,而不像他的关于nginx的网页. 于是我用xftp登录服务器查看配置文 ...

  4. python自动化部署nginx_扣丁学堂Python开发运维自动化之nginx配置文件对比操作

    扣丁学堂Python开发运维自动化之nginx配置文件对比操作 2018-08-30 09:51:29 646浏览 今天扣丁学堂Python培训老师给大家介绍一下关于Python运维自动化之nginx ...

  5. Nginx+rtmp+ffmpeg搭建视频转码服务

    第一步,安装nginx-rtmp-module 模块 因为nginx搭建流媒体服务需要用到 nginx-rtmp-module 模块,所以先安装nginx-rtmp-module # cd /root ...

  6. MongoDB笔记记录(雷哥课堂)–基本命令

    MongoDB笔记记录(雷哥课堂)–基本命令 3 常用命令 3.1 数据库操作 3.1.1 选择和创建数据库 use 数据库名称 如果数据库不存在就自动创建,如果存在则选择该数据库 以下数据库名是保留 ...

  7. eclipse中如何使用Git/gitee【雷哥】pull拉代码,commit提交到本地,Push推送到服务器

    eclipse中如何使用Git系列文章目录 文章目录 eclipse中如何使用Git系列文章目录 前面 eclipse中如何使用Git 1.配置全局用户 2.配置公钥 3.在gitee创建空仓库 4. ...

  8. nginx配置文件优化(详细)

    nginx优化项 隐藏nginx版本 nginx 配置项优化 开启高效传输模式 fastcgi 调优 gzip 调优 expires 缓存调优 内核参数优化 系统连接数的优化 准备nginx测试环境 ...

  9. Nginx配置文件nginx.conf中文详解(转)

    ######Nginx配置文件nginx.conf中文详解######定义Nginx运行的用户和用户组 user www www;#nginx进程数,建议设置为等于CPU总核心数. worker_pr ...

最新文章

  1. hdu1181变形课dfs/bfs/并查集三种解法(java)
  2. 华为鸿蒙系统可以用在哪里,【图片】华为鸿蒙系统的厉害之处在于 你可能非用不可 !【手机吧】_百度贴吧...
  3. gRPC的那些事 - streaming
  4. VTK:图片之ImageContinuousDilate3D
  5. MATLAB里面的filter和filtfilt的C语言源代码
  6. 安装hadoop集群---resourcemanager和NameNode同一台机器上
  7. 华为云GaussDB(for MySQL)2.0全新升级,三大技术大揭秘
  8. Python Revisited Day 09 (调试、测试与Profiling)
  9. iphone手机屏幕开发尺寸
  10. CDH安全认证及使用
  11. 双料大奖 | 奇点云获评「年度数字化创新最佳实践奖」「年度数字化服务最值得信赖品牌奖」
  12. 我做产品的三大思维:发散思维、纵横思维和表里思维(下篇)
  13. F5 微信银行解决方案
  14. 赴日研修的发展怎么样
  15. android wifi传图片,「教程」将Mac电脑上的照片无线传到安卓手机上
  16. 使用 腾讯云搭建一个个人博客
  17. matlab与数学实验心得体会,数学matlab实验心得体会
  18. echarts图表x,y轴的设置
  19. Scrapy--CrawlSpider
  20. 《Gans in Action》第一章 对抗神经网络介绍

热门文章

  1. Docker可视化工具:Portainer可视化面板安装
  2. 软件测试--兼容性测试
  3. 2019年360、云路、盯盯拍行车记录仪测评-索尼感光VS OV感光实拍效果对比
  4. The Things Network LoRaWAN Stack V3 学习笔记 2.1.1 使用 CockroachDB Shell 操作 Identity Server
  5. SAAS、PAAS、IAAS近在手边
  6. 从PCA到K-means的一次实际运用(python实现)
  7. 留学归来!我拿到了美团,阿里,腾讯等一线名企offer,分享一下我的面试经验!
  8. 志强系列的服务器能吃鸡吗,国产高端 浪潮四路四核服务器产品解析
  9. 关于sfdisk分区命令不支持的问题
  10. 书法教学仪的功能特性及参数有哪些?