默认nginx.conf
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的更多相关文章
- 基础篇七:默认配置语法(/etc/nginx/nginx.conf)
首选我们 vim nginx.conf 参照上图,我们看看nginx.conf 的个参数含义 我们再看看 /etc/nginx/conf.d/default.conf
- Nginx配置文件nginx.conf中文详解(转)
######Nginx配置文件nginx.conf中文详解##### #定义Nginx运行的用户和用户组 user www www; #nginx进程数,建议设置为等于CPU总核心数. worker_ ...
- <nginx.conf> nginx用户权限
Nginx用户权限 在nginx.conf文件的第一行一般是设置用户的地方(编译安装nginx时的参数--user=<user>也是指定用户的地方),如 user www www; 如不指 ...
- CentOS下配置nginx conf/koi-win为同一文件的各类错误
今天配置CentOS6.5下安装Nginx + php7 + mysql5.7.15遇到了一些坑.本来家里的电脑在配置环境的时候没有问题,拿去公司的电脑上就是到处报错.不知道是不是人品问题.今晚在家重 ...
- Nginx配置文件(nginx.conf)配置详解(2)
Nginx的配置文件nginx.conf配置详解如下: user nginx nginx ; Nginx用户及组:用户 组.window下不指定 worker_processes 8; 工作进程:数目 ...
- Nginx的nginx.conf配置文件中文注释说明
#运行用户 user www-data; #启动进程,通常设置成和cpu的数量相等 worker_processes 1; #全局错误日志及PID文件 erro ...
- nginx.conf详解
##定义nginx运行的用户各用户组user nginx nginx; ##nginx进程数,建议设置与cpu核心数一致worker_processes 1; #为每个进程分配CPU的工作内核 wor ...
- nginx.conf各参数的意义
搬运+翻译至 http://qiita.com/syou007/items/3e2d410bbe65a364b603 /etc/nginx/nginx.conf 记录各个参数的意义 user user ...
- Nginx配置文件(nginx.conf)配置详解
Nginx的配置文件nginx.conf配置详解如下: user nginx nginx ; Nginx用户及组:用户 组.window下不指定 worker_processes 8; 工作进程:数目 ...
- nginx配置文件nginx.conf超详细讲解
#nginx进程,一般设置为和cpu核数一样worker_processes 4; #错误日志存放目录 error_log /data1/logs/er ...
随机推荐
- 【MongoDB】Re05 分片集群(Win平台搭建)
分片副本集1 (3实例) 主1 从1 裁1 分片副本集2 (3实例) 主1 从1 裁1 配置副本集(3实例) 主1 从2 路由(2配置) 用Windows平台搭建 配置目录设置: ├─config ...
- 【Kafka】03 Shell 操作
查看Kafka主题列表 $KAFKA_HOME/bin/kafka-topics.sh \ --zookeeper centos7-02:2181,centos7-03:2181,centos7-04 ...
- 【Hadoop】3.3.1版本部署
硬件环境: 虚拟机环境配置 硬件:1CPU + [RAM]4G + [DISK]128G 系统:Centos7 x64 这里没有像尚硅谷一样做地址映射解析,直接取IP(我太懒) 192.168.242 ...
- 【Vue】Re15 Router 第二部分(缺省路由、动态路由)
一.设置首页重定向: import Vue from 'vue'; import Router from 'vue-router'; import Home from "../compone ...
- 【Vue】Re07 插槽Slot
一.插槽基本使用 <!DOCTYPE html> <html lang="en"> <head> <meta charset=" ...
- (续)signal-slot:python版本的多进程通信的信号与槽机制(编程模式)的库(library) —— 强化学习ppo算法库sample-factory的多进程包装器,实现类似Qt的多进程编程模式(信号与槽机制) —— python3.12版本下成功通过测试
前文: signal-slot:python版本的多进程通信的信号与槽机制(编程模式)的库(library) -- 强化学习ppo算法库sample-factory的多进程包装器,实现类似Qt的多进程 ...
- vscode配置远程项目开发
0. vscode中安装remote development插件 (略) 1. 客户端进行配置 按键:ctrl+shift+p 在输入框中输入: Preferences: Open User Sett ...
- baselines算法库baselines/common/input.py模块分析
baselines算法库baselines/common/input.py模块代码: import numpy as np import tensorflow as tf from gym.space ...
- 【EF Core】自动生成的字段值
自动生成字段值,咱们首先想到的是主键列(带 IDENTITY 的主键).EF Core 默认的主键配置也是启用 Identity 自增长的,而且可以自动标识主键.前提是代表主键的实体属性名要符合以下规 ...
- C# Cefsharp 如何利用[Attribute]的把C#中的方法给到浏览器中调用
背景 "有没有遇见这样一个场景,需要注入到浏览器的类太多,又想统一管理且不遗漏,有没有什么好办法?""有有有,把头伸过来~" 解决办法 第一步:提供一个[Att ...