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. 视觉测距和SLAM —— Visual Odometry / SLAM

    地址: https://www.cvlibs.net/datasets/kitti/eval_odometry.php

  2. 遗传算法和神经网络融合算法:GA-BP算法流程图

    相关: https://d.wanfangdata.com.cn/periodical/sxgcxb202109004

  3. python中多进程下通信使用管道Pipe与队列 Queue 的区别: Multiprocessing - Pipe vs Queue

    参考: https://stackoverflow.com/questions/8463008/multiprocessing-pipe-vs-queue ====================== ...

  4. 部署MatterMost-开源团队协作平台

    前言 之前的文章有提到部署 MatterMost 的事. 本文来记录一下. 关于 MatterMost MatterMost 有点像 Slack 这种协作工具,而且和 GitLab 的集成还不错,正好 ...

  5. R包pheatmap:用参数一步步详细绘制热图

    经常会想到用热图来展示某个基因或某些基因的表达量问题,今天用R中pheatmap包一步步绘制热图. 第一步:公众路径设置,调用包pheatmap,读取目的文件,查看文件. 1 rm(list=ls() ...

  6. java关于二维数组的操作

    代码: ''' package tests; public class Yanghui { public static void main(String[] args) { //声明二维数组的三种方式 ...

  7. 如何用python做一个简单的小游戏 Pygame

    当然可以!下面是一个简单的Python游戏开发教程,帮助你入门: 安装Pygame库 Pygame是一个Python游戏开发库,可以帮助你创建游戏窗口.绘制图形.处理用户输入等.你可以使用以下命令在命 ...

  8. springboot之banner.txt

    在springboot启动过程中,我们经常可以看到控制台打印下面图文: 实际上这个打印图文,是可以自定义的,可以在springboot的resource中创建一个banner.txt文件,在启动时就会 ...

  9. 从0写一个电话号码管理的C入门项目【适合初学者】

    0.前言 上次发了一个嵌入式的学习路线,很多粉丝问我各个阶段的入门项目,其中第二阶段的<基于socket聊天室>写了4篇循序渐进的文章,而第一阶段的<电话号码本管理>也非常想要 ...

  10. 折腾 Quickwit,Rust 编写的分布式搜索引擎-官方教程

    快速上手 在本快速入门指南中,我们将安装 Quickwit,创建一个索引,添加文档,最后执行搜索查询.本指南中使用的所有 Quickwit 命令都在 CLI 参考文档 中进行了记录. https:// ...