nginx启动、配置及测试图文详解(全网最全)

  # ip 100

  server {

  listen 80;

  server_name 192.168.191.100;

  location / {

  root /usr/local/nginx/html/ip/100;

  index index.html;

  }

  }

  # ip 200

  server {

  listen 80;

  server_name 192.168.191.200;

  location / {

  root /usr/local/nginx/html/ip/200;

  index index.html;

  }

  }

  # port 100

  server {

  listen 100;

  server_name 192.168.191.129;

  location / {

  root /usr/local/nginx/html/port/100;

  index index.html;

  }

  }

  # port 200

  server {

  listen 200;

  server_name 192.168.191.129;

  location / {

  root /usr/local/nginx/html/port/200;

  index index.html;

  }

  }

  # www.jiege.com

  server {

  listen 80;

  server_name www.jiege.com;

  location / {

  root /usr/local/nginx/html/name/jiege;

  index index.html;

  }

  }