• Nginx配置虚拟主机


    以hostname区分不同的网站,一个server{ }配置块就是一个网站。

    # 省略一些配置
    ......
    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; server { listen 80; server_name www.ccke.org; # 网站A
    location / { root html; index index.php index.html; }
    error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } server { listen 80; server_name www.nmka.com; # 网站B
    location / { root html; index index.html; }
    error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } }
    # 省略一些配置
    ...... }
  • 相关阅读:
    Vue基础第三章
    Vue基础第二章
    Vue基础第一章
    AWS笔记
    导入Dynamic Web Project后程序有红叉但是可以运行
    JSTL配置文件下载地址
    access纯jdbc连接
    XML学习总结二——DTD
    【转】无题
    XML学习总结一
  • 原文地址:https://www.cnblogs.com/dgjnszf/p/11960667.html
Copyright © 2020-2023  润新知