2,nginx的简单配置

这是nginx配置文件中的一些简单信息,nginx.conf文件

user nginx;

error_log /var/log/nginx/error.log info;

worker_processes  1;

events {

    worker_connections  1024;

}

http {

        include      mime.types;

        default_type  application/octet-stream;

        sendfile        on;

        keepalive_timeout  65;

        tcp_nopush    on;   

tcp_nodelay    on;

gzip  on;

    server {

        listen      80;

        server_name  xiaomi.liubo.com;

root /data/web;

        location / {

            index  index.php index.html index.htm;

        }

location ~ \.php$ {

    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  500 502 503 504  /50x.html;

        location = /50x.html {

            root  html;

            }

        }

        include vhost/*.conf;

}

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 1.ngnix介绍 ngnix www服务软件 俄罗斯人开发 开源 性能很高 本身是一款静态WWW软件 静态小文件...
    逗比punk阅读 2,121评论 1 6
  • 《老男孩Linux运维》笔记 隐藏Nginx软件版本号 一般来说,软件的漏洞都和版本有关。因此要尽量隐藏对访问用户...
    Zhang21阅读 3,674评论 0 28
  • 一.nginx主配置文件目录: 1.win-utf, koi-utf,koi-win 这三个文件都是与编码转换映射...
    宇晨棒棒的阅读 1,851评论 0 1
  • Nginx简介 解决基于进程模型产生的C10K问题,请求时即使无状态连接如web服务都无法达到并发响应量级一万的现...
    魏镇坪阅读 2,037评论 0 9
  • 常用命令 查看系统版本: head -n 1 /etc/issue lsb_release-a (centos ...
    Notonlyphper阅读 1,986评论 1 4