zoukankan      html  css  js  c++  java
  • ngin 多域名配置

    user  root;
    worker_processes  1;
    events {
        worker_connections  65535;
    }
    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;
        keepalive_timeout  65 65;
        server {
            listen       80;
       #第一个域名 server_name www.magege.com; location / { root /usr/share/nginx/html; index index.html; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } server { listen 80;
    #第二个域名 server_name app.magege.com; location / { root /usr/share/nginx/app; index index.html; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } server { listen 443 ssl http2 default_server; listen [::]:443 ssl http2 default_server; server_name 49.232.195.203; root /usr/share/nginx/html; ssl_certificate /home/certs/www.magedu.net.crt; ssl_certificate_key /home/certs/www.magedu.net.key; ssl_session_cache shared:SSL:20m; ssl_session_timeout 10m; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers off; include /etc/nginx/default.d/*.conf; location / { index index.html index.php index.htm; } location ~ .php$ { root /home/opt/nginx/html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } error_page 404 /404.html; location = /404.html { } error_page 500 502 503 504 /50x.html; location = /50x.html { } } }

      

     

  • 相关阅读:
    codevs 3971 航班
    2015山东信息学夏令营 Day4T3 生产
    2015山东信息学夏令营 Day5T3 路径
    Tyvj 1221 微子危机——战略
    清北学堂模拟赛 求和
    NOIP2012同余方程
    NOIP2009 Hankson的趣味题
    bzoj1441 MIN
    国家集训队论文分类
    贪心 + DFS
  • 原文地址:https://www.cnblogs.com/sqbk/p/14379228.html
Copyright © 2011-2022 走看看