zoukankan      html  css  js  c++  java
  • default.conf

    1、
    /etc/nginx/conf.d/ 下设置一个 default.conf,server_name 设置为 localhost,如果有其他非法域名 A 记录到该机器上,
    则返回默认的 Nginx 页面
    server {
    listen 80;
    server_name localhost;

    #charset koi8-r;
    #access_log /var/log/nginx/log/host.access.log main;

    location / {
    root /usr/share/nginx/html;
    index index.html index.htm;
    }

    #error_page 404 /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
    root /usr/share/nginx/html;
    }
    }

    2、
    server {
    listen 80;
    root /var/www/html;
    index index.html index.htm index.php;
    server_name _;
    error_page 500 502 503 504 /50x.html;

    location = /50x.html {
    root /var/lib/nginx/html;
    }

    location ~ .php$ {
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    include fastcgi.conf;
    }
    }

    3、
    server {
    listen 80;
    root /var/www/html;
    index index.html index.htm index.php;
    server_name _;
    error_page 500 502 503 504 /50x.html;

    location = /50x.html {
    root /var/lib/nginx/html;
    }

    location ~ .php$ {
    root /usr/share/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;
    }
    }

  • 相关阅读:
    ASP.NET 文件下载
    Asp.net 加密解密类
    ASP.Net 获取服务器信息
    Visual Studio 2013 和 ASP.NET 预览
    Windows Server 2012安装时所需要的KEY
    WordPress主题模板层次和常用模板函数
    小meta的大作用
    《淘宝技术这十年》之LAMP架构的网站
    面试题(八)
    面试题(七)
  • 原文地址:https://www.cnblogs.com/luoyan01/p/9734190.html
Copyright © 2011-2022 走看看