nginx web服务器配置
来源:互联网 发布:淘宝樱木花道家鞋真吗 编辑:程序博客网 时间:2024/04/29 10:35
user root;
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;
server {
listen 80;#端口号
server_name localhost;#本机
charset utf-8;
#access_log logs/host.access.log main;
location /res {
root /home; #访问路径 这个/res代表访问/home/res里面的文件
index index.html index2.htm; #html文件名称
}
error_page 404 /404.html;
}
}
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;
server {
listen 80;#端口号
server_name localhost;#本机
charset utf-8;
#access_log logs/host.access.log main;
location /res {
root /home; #访问路径 这个/res代表访问/home/res里面的文件
index index.html index2.htm; #html文件名称
}
error_page 404 /404.html;
}
}
阅读全文
0 0
- nginx配置web服务器
- Nginx 配置 Web服务器
- nginx web服务器配置
- nginx配置静态web服务器
- Nginx 配置静态web服务器
- WEB(nginx、apache)服务器配置mod_ssl
- 配置Nginx Web服务器及虚拟主机主机
- 如何将 Nginx 配置为Web服务器
- Nginx配置静态服务器与WEB应用服务器映射
- ubuntu11.10配置WEB服务器 Nginx + PHP + MySql
- nginx下禁止某些ip访问web服务器的配置
- 高性能Web服务器Nginx的配置与部署研究
- 重量级WEB服务器Nginx(常用配置实…
- 配置Nginx防止直接用IP访问Web服务器
- 配置Nginx防止直接用IP访问Web服务器
- 搭建高性能WEB服务器nginx搭建与配置
- CentOS-6.3系统中安装配置Web服务器Nginx
- web服务器使用HTTPS,基于tomcat :nginx配置
- 习题8-1:装箱(贪心)
- Python requests库中文乱码问题
- ISO格式的pe系统如何安装到U盘上
- java定义赋值输出二维数组
- 安装Scrapy过程笔记
- nginx web服务器配置
- 快速搭建 Node.js 开发环境以及加速 npm
- 如何在Dev c++里配置Artistic Style格式化工具
- 一些烦人的琐事
- 1.7.5停止线程(stop方法暴力停止)
- Android性能优化工具之Traceview
- 统一建模语言
- Java基础面试题整理
- Servlet中文乱码处理