http {
  index index.php index.htm index.html;
  server {
    server_name www.site1.com;
    location / {
      # [...]
    }
  }
  server {
    server_name site2.com;
    location / {
      # [...]
     }
    location /foo {
      # [...]
    }
  }
}

在nginx的http模块下面,一个server就可以看做一个站点,配置形式大概是这样的:的更多相关文章

  1. 一个IP多个https站点配置

    在一台主机上放置一个https网站,究竟该怎么配置?对于IIS和Apache以及Nginx等不同的服务器,方法是不同的,网上有很多教程,在此就不再赘述了. 至于一台主机,如何配置多个https网站呢? ...

  2. nginx安装lua模块实现高并发

    nginx安装lua扩展模块 1.下载安装LuaJIT-2.0.4.tar.gz wget -c http://luajit.org/download/LuaJIT-2.0.4.tar.gz tar ...

  3. 多个client与一个server端通信的问题

    多个client与一个server端通信的问题 上篇博文主要是讲的关于client与server端的通信问题.在上篇博文中当我们仅仅有一个client訪问我们的server时是能够正常执行的,可是当我 ...

  4. nginx js、css多个请求合并为一个请求(concat模块)

    模块介绍 mod_concat模块由淘宝开发,目前已经包含在tengine中,并且淘宝已经在使用这个nginx模块.不过塔暂时没有包含在nginx中.这个模块类似于apache中的modconcat. ...

  5. nginx添加一个server

    nginx添加一个server server { listen 80; server_name dev.pccb.com; index index.html index.htm; # rewrite ...

  6. nginx利用geo模块做限速白名单以及geo实现全局负载均衡的操作记录

    geo指令使用ngx_http_geo_module模块提供的.默认情况下,nginx有加载这个模块,除非人为的 --without-http_geo_module.ngx_http_geo_modu ...

  7. Nginx SPDY Pagespeed模块编译——加速网站载入

    在看<Web性能权威指南>的时候,看到了SPDY这货,于是便开始折腾起了这个了,也顺便把pagespeed加了进去. Nginx SPDY 引自百科~~ SPDY(读作“SPeeDY”)是 ...

  8. nginx利用limit模块设置IP并发防CC攻击

    nginx利用limit模块设置IP并发防CC攻击 分类: 系统2013-01-21 09:02 759人阅读 评论(0) 收藏 举报 来源:http://blog.xencdn.net/nginx- ...

  9. OSX安装nginx和rtmp模块(rtmp直播服务器搭建)

    1.安装Homebrew,执行命令 1 ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/ma ...

随机推荐

  1. [vue]组件的导入

    参考: http://vue2.mmxiaowu.com/article/584a3957fc007e72b0f576d9 vue组件的注册 1.通过components方式注册 2.通过router ...

  2. 【MySQL】-NO.21.MySQL.1.MySQL.1.001-【Install MySQL5.7 On Windows】

    1.0.0 Summary Tittle:[MySQL]-NO.21.MySQL.1.MySQL.1.001-[Install MySQL5.7 On Windows] Style:Web Serie ...

  3. PHP Fatal error: Uncaught ErrorException: preg_match_all (): JIT compilation failed: no more memory in phar

    PHP 升级到 7.3 后,出现 BUG: 解决办法:修改php.ini文件,;pcre.jit=1 =>  pcre.jit=0

  4. AFNetworking 源码解析

    3.0 之后,就取消了NSOperation的控制. 因为根据Apple Developer Document的文档 https://developer.apple.com/documentation ...

  5. CentOS6.5安装Tomcat8.0

    1.首先从官网下载最新的安装包 http://tomcat.apache.org/  apache-tomcat-8.0.20.tar.gz 2.上传安装包到 /usr/local/mypackage ...

  6. WebActivatorEx—动态注册httpmodle

    源代码:https://github.com/davidebbo/WebActivator/tree/master/WebActivator unity使用演示 WebActivator类库提供了3种 ...

  7. centos make error: fatal error: curses.h: No such file or directory

    yum install ncurses.x86_64 yum install ncurses-devel.x86_64 yum install ncurses-libs.x86_64 yum inst ...

  8. iOS 新浪微博-2.0 搜索框/标题带箭头/下拉菜单

    不管是搜索框还是下拉菜单,我们都需要对背景的图片进行拉伸.定义一个Category分类对图片进行操作. UIImage+Effect.h #import <UIKit/UIKit.h> @ ...

  9. vue父组件数据改变,子组件数据并未发生改变(那是因为你没写监听)附带子组件的写法

    下面的代码有 父组件有三个按钮,年.月.日 点击之后父组件的数据发生改变,子组件却没改变,打印接受的数据,除了第一次其他都没打印,那是因为你没有写监听 <template> <div ...

  10. Adobe Flash Builder 调试器无法连接,无法进行调试,构建停止在57%

    参考:https://blog.csdn.net/wuboyaogun1/article/details/9105373 谷歌浏览器下载Flash debugger :Download the Win ...