nginx.conf.default
[root@web03 conf]# vim nginx.conf.default
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include 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 logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
"nginx.conf.default" 117L, 2656C
[root@web03 conf]# egrep -v -v "#|^$" nginx.conf.default
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
[root@web03 conf]#
[root@web03 conf]# egrep -v -v "#|^$" nginx.conf.default >nginx.conf
[root@web03 conf]# vim nginx.conf
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
"nginx.conf" 53L, 515C
[root@web03 conf]# /application/nginx/sbin/nginx -t
nginx: the configuration file /application/nginx-1.6.3/conf/nginx.conf syntax is ok
nginx: configuration file /application/nginx-1.6.3/conf/nginx.conf test is successful
[root@web03 conf]# /application/nginx/sbin/nginx -s reload
[root@web03 conf]#
nginx.conf.default的更多相关文章
- nginx作为web服务以及nginx.conf详解
Nginx系列文章:http://www.cnblogs.com/f-ck-need-u/p/7576137.html 1.nginx简介 nginx是一个优秀的web服务程序.反向代理程序.它采用非 ...
- centos LNMP第一部分环境搭建 LAMP LNMP安装先后顺序 php安装 安装nginx 编写nginx启动脚本 懒汉模式 mv /usr/php/{p.conf.default,p.conf} php运行方式SAPI介绍 第二十三节课
centos LNMP第一部分环境搭建 LAMP安装先后顺序 LNMP安装先后顺序 php安装 安装nginx 编写nginx启动脚本 懒汉模式 mv /usr/local/php/{ ...
- Nginx配置文件 nginx.conf 和default.conf 讲解
nginx.conf /etc/nginx/nginx.conf ######Nginx配置文件nginx.conf中文详解##### #定义Nginx运行的用户和用户组 user www www; ...
- nginx配置文件nginx.conf超详细讲解
#nginx进程,一般设置为和cpu核数一样worker_processes 4; #错误日志存放目录 error_log /data1/logs/er ...
- [原]生产环境下的nginx.conf配置文件(多虚拟主机)
[原]生产环境下的nginx.conf配置文件(多虚拟主机) 2013-12-27阅读110 评论0 我的生产环境下的nginx.conf配置文件,做了虚拟主机设置的,大家可以根据需求更改,下载即可在 ...
- nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf:37
一:开始Nginx的SSL模块 1.1 Nginx如果未开启SSL模块,配置Https时提示错误 1 nginx: [emerg] the "ssl" parameter requ ...
- nginx.conf(centos7 1.14)主配置文件修改
#nginx1.14 centos7# For more information on configuration, see:# * Official English Documentation: h ...
- nginx配置文件nginx.conf 不包括server节点
整理的一个nginx.conf的配置,不包括server节点介绍 原文请查看,Nginx配置文件(nginx.conf)配置详解 # For more information on configura ...
- ubuntu 13.04 nginx.conf 配置详解
1.nginx.conf 文件,路径为:/etc/nginx/agin.conf #使用的用户和组 user www-data; #指定工作衍生进程数(一般等于CPU总核数或总核数的两倍) worke ...
随机推荐
- 关于使用css伪类实现小图标
效果: .person_use>span{ display:block; width:0; height:0; border-width:10px; border-style:solid; bo ...
- Pyhton学习——Day7
##############################################匿名函数################################################## ...
- django patch 解决 ["'15428560000' value has an invalid format. It must be in YYYY-MM-DD HH:MM[:ss[.uuuuuu]][TZ] format."]
__init__.py import datetime from django.apps import AppConfig from django.db.models.fields import Da ...
- ThoughtWorks 技术雷达(2013年5月)
ThoughtWorks技术雷达(2013年5月) 作者ThoughtWorks技术战略委员会 发布于 六月 25, 2013| 讨论 新浪微博腾讯微博 豆瓣网 Twitter Facebook li ...
- js类的使用
brush示例 以d3的一个brush进行叙述,示例见: https://bl.ocks.org/xunhanliu/6f0b46789842e9e19e6cfe9bd0b16806 应用情形: 当页 ...
- linux软链接与硬链接详解
软连接 命令: ln -s 原文件 目标文件 特征: 1.相当于windows的快捷方式 2.只是一个符号连接,所以软连接文件大小都很小 3.当运行软连接的时候,会根据连接指向找到真正的文件,然后执行 ...
- pytorch 6 build_nn_quickly 快速搭建神经网络
import torch import torch.nn.functional as F # replace following class code with an easy sequential ...
- 高级函数-sign
==========sign函数介绍(补充)=========== sign(n):判断n>0返回1;n=0返回0;n<0返回-1. select sign(10),sign(0) ...
- 获取ip,判断用户所在城市
PHP获取IP地址 这个比较简单了,利用PHP自带函数就可以了,PHP中文手册看一下,都有现成的例子,就不过多说明了,直接上代码,A段: <? //PHP获取当前用户IP地址方法 $xp_Use ...
- maven小知识点
Maven 使用惯例优于配置的原则 .它要求在没有定制之前,所有的项目都有如下的结构: 一个 maven 项目在默认情况下会产生 JAR 文件,另外 ,编译后 的 classes 会放在 basedi ...