user nginx;
worker_processes auto; error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid; events {
worker_connections 1024;
} http {
include /etc/nginx/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 /var/log/nginx/access.log main; sendfile on;
#tcp_nopush on; keepalive_timeout 65; #gzip on; include /etc/nginx/conf.d/*.conf;
}
server {
listen 80;
listen [::]:80;
server_name localhost; #access_log /var/log/nginx/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;
} # proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#} # deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}

默认nginx.conf的更多相关文章

  1. 基础篇七:默认配置语法(/etc/nginx/nginx.conf)

    首选我们 vim nginx.conf 参照上图,我们看看nginx.conf 的个参数含义 我们再看看 /etc/nginx/conf.d/default.conf

  2. Nginx配置文件nginx.conf中文详解(转)

    ######Nginx配置文件nginx.conf中文详解##### #定义Nginx运行的用户和用户组 user www www; #nginx进程数,建议设置为等于CPU总核心数. worker_ ...

  3. <nginx.conf> nginx用户权限

    Nginx用户权限 在nginx.conf文件的第一行一般是设置用户的地方(编译安装nginx时的参数--user=<user>也是指定用户的地方),如 user www www; 如不指 ...

  4. CentOS下配置nginx conf/koi-win为同一文件的各类错误

    今天配置CentOS6.5下安装Nginx + php7 + mysql5.7.15遇到了一些坑.本来家里的电脑在配置环境的时候没有问题,拿去公司的电脑上就是到处报错.不知道是不是人品问题.今晚在家重 ...

  5. Nginx配置文件(nginx.conf)配置详解(2)

    Nginx的配置文件nginx.conf配置详解如下: user nginx nginx ; Nginx用户及组:用户 组.window下不指定 worker_processes 8; 工作进程:数目 ...

  6. Nginx的nginx.conf配置文件中文注释说明

    #运行用户    user www-data;        #启动进程,通常设置成和cpu的数量相等    worker_processes  1;    #全局错误日志及PID文件    erro ...

  7. nginx.conf详解

    ##定义nginx运行的用户各用户组user nginx nginx; ##nginx进程数,建议设置与cpu核心数一致worker_processes 1; #为每个进程分配CPU的工作内核 wor ...

  8. nginx.conf各参数的意义

    搬运+翻译至 http://qiita.com/syou007/items/3e2d410bbe65a364b603 /etc/nginx/nginx.conf 记录各个参数的意义 user user ...

  9. Nginx配置文件(nginx.conf)配置详解

    Nginx的配置文件nginx.conf配置详解如下: user nginx nginx ; Nginx用户及组:用户 组.window下不指定 worker_processes 8; 工作进程:数目 ...

  10. nginx配置文件nginx.conf超详细讲解

    #nginx进程,一般设置为和cpu核数一样worker_processes 4;                        #错误日志存放目录 error_log  /data1/logs/er ...

随机推荐

  1. 【Redis】06 事务

    Redis事务 可以一次执行多个命令,本质是一组命令的集合. 一个事务中的 所有命令都会序列化,按顺序地串行化执行而不会被其它命令插入,不许加塞 官方说明: https://redis.io/topi ...

  2. 【Vue】13 VueRouter Part3 路由守卫

    单页应用中,只存在一个HTML文件,网页的标签,是通过title标签显示的,我们在单页应用中如何修改? JS操作: window.document.title = "标签名称" 也 ...

  3. If Messi doesn't understand how to respect others, then he also doesn't deserve to receive respect from others.

    If Messi doesn't understand how to respect others, if he doesn't understand the spirit of honoring c ...

  4. springboot接口入参下划线转驼峰以及返回参数驼峰转下划线实现

    1.背景 在实际开发中,通常来说java里面是使用驼峰的命名规则; 但是有时候在对接其他三方平台的接口时,要求使用下划线的命名规则,这时候就涉及到如何让自己的接口满足三方平台的下划线; 实现方式有 1 ...

  5. Python按条件删除Excel表格数据的方法

      本文介绍基于Python语言,读取Excel表格文件,基于我们给定的规则,对其中的数据加以筛选,将不在指定数据范围内的数据剔除,保留符合我们需要的数据的方法.   首先,我们来明确一下本文的具体需 ...

  6. Wetab 标签页:内置多种免费实用优雅小组件的浏览器主页和起始页

    Wetab 是什么? Wetab 是一款基于浏览器的新标签页产品,主张辅助用户打造一个兼具效率与美观的主页. Wetab 的核心特色便是内置了多种实用.优雅的小组件. 今天这篇,主要按照分类详细介绍  ...

  7. 圣诞节快乐,教你用shell脚本实现一颗圣诞树。【小酷炫】

    前言 圣诞节到了! 一口君在这祝各位粉丝朋友圣诞节快乐! 祝各位考研的同学金榜题名! 祝找工作的朋友offer接到爆! 祝各位老板新年大发财源! 在此一口君特地用shell脚本画了一个圣诞树! 先来看 ...

  8. zabbix 应用框架分析

    本文通过源码分析,探究zabbix web应用的整体架构,所有分析基于zabbix 3.0.10进行. 总体而言,zabbix web应用使用PHP开发,大量应用OOP方法,主要采用mvc架构,同时包 ...

  9. spring boot使用多数据源体验

    小白是一名.net程序员,之前小白介绍了过了自己的博客系统http://www.ttblog.site/,用.net写厌了,所以想学下java尝尝鲜,于是小白准备用spring boot来实现一个博客 ...

  10. Ubuntu 设置 SMB 服务

    安装 Samba 包 sudo apt install samba samba-common 创建用于 SMB 共享的文件夹 sudo mkdir /usr/local/volumes # 新建用于共 ...