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 ...
随机推荐
- 每日Linux命令--不完整命令
配置文件优化,即把默认的空行还有#注释行去掉,优化前先拷贝一份配置文件 egrep -v '^$|#' 拷贝的配置文件 > 原配置文件 mysql如何修改root用户的密码 方法1: 用SET ...
- java EE使用response返回中文时,出现乱码问题
response.setHeader("content-type", "text/html;charset=UTF-8");
- React 中的 AJAX 请求:获取数据的方法
React 中的 AJAX 请求:获取数据的方法 React 只是使用 props 和 state 两处的数据进行组件渲染. 因此,想要使用来自服务端的数据,必须将数据放入组件的 props 或 st ...
- angular-表格
ng-repeat 指令可以完美的显示表格. <div ng-app="myApp" ng-controller="customersCtrl"> ...
- maven也是Apache开发的,也是java开发的。maven需要你本地系统JDK的支持
1. 3. 添加 M2_HOME 和 MAVEN_HOME 添加 M2_HOME 和 MAVEN_HOME 环境变量到 Windows 环境变量,并将其指向你的 Maven 文件夹. M2_HOME ...
- java Semaphore信号亮-同意多个任务同一时候訪问这个资源--thinking in java21.7.6
package org.rui.thread.newc.semaphore; import java.util.ArrayList; import java.util.List; import jav ...
- @dynamic与@synthesize的差别
如今非常多时候我们都已经不再使用@synthesizekeyword了,可是须要了解当中的原理: 一.@dynamic与@synthesize的差别 @property有两个相应的词.一个是@synt ...
- android 处理Back键按下事件
package com.example.keyevent; import android.os.Bundle; import android.view.KeyEvent; import android ...
- bzoj1019: [SHOI2008]汉诺塔(动态规划)
1019: [SHOI2008]汉诺塔 题目:传送门 简要题意: 和经典的汉诺塔问题区别不大,但是题目规定了一个移动时的优先级: 如果当前要从A柱子移动,但是A到C的优先级比A到B的优先级大的话,那就 ...
- m_Orchestrate learning system---十二、为什么thinkphp验证场景里面的多个属性之间是逗号
m_Orchestrate learning system---十二.为什么thinkphp验证场景里面的多个属性之间是逗号 一.总结 一句话总结:因为是数组啊 1 protected $scene ...