原始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;}error_page 500 502 503 504 /50x.html;location = /50x.html {root html;}}
}
完整
#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;server {listen 80;server_name localhost;#charset koi8-r;#access_log logs/host.access.log main;location / {root 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 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;#}}# another virtual host using mix of IP-, name-, and port-based configuration##server {# listen 8000;# listen somename:8080;# server_name somename alias another.alias;# location / {# root html;# index index.html index.htm;# }#}# HTTPS server##server {# listen 443 ssl;# server_name localhost;# ssl_certificate cert.pem;# ssl_certificate_key cert.key;# ssl_session_cache shared:SSL:1m;# ssl_session_timeout 5m;# ssl_ciphers HIGH:!aNULL:!MD5;# ssl_prefer_server_ciphers on;# location / {# root html;# index index.html index.htm;# }#}}
原始nginx.conf备份相关推荐
- nginx.conf文件(原始无修改)
在这里为大家提供nginx.conf原始文件,前段时间因为本人的一通操作差点搞崩,还好救了回来,在这里给大家提供一个备份,以免发生悲剧 首先教大家怎么去把这个改坏了的文件修改回来并使其生效 登录服务器 ...
- nginx.conf 基本配置模板和结构
文章目录 配置 nginx.conf 配置结构 nginx.conf 基本配置模板 如何验证效果 配置 nginx.conf 配置结构 ... #全局块 events { #events块 ... } ...
- 在nginx.conf中配置https
在nginx.conf中配置server段, 将证书mycert.pem和私钥pem添加到指定文件中 server { listen 443 ssl; ssl on; ssl_ ...
- 三、nginx服务的nginx.conf的参数配置解析
前一篇:二.nginx服务的nginx.conf配置参数解析 后一篇:四.nginx服务器的参数配置解析 目录 一.虚拟主机设定模块 1.upstream模块配置样式 1.1.默认配置 1.2.wei ...
- nginx作为web服务以及nginx.conf详解
Nginx系列文章:http://www.cnblogs.com/f-ck-need-u/p/7576137.html 1.nginx简介 nginx是一个优秀的web服务程序.反向代理程序.它采用非 ...
- Nginx - 正反向代理,nginx.conf配置
Nginx (engine x) 是一个轻量级的高性能的HTTP和反向代理web服务器及电子邮件(IMAP/POP3)代理服务器. Nginx 是由俄罗斯人 Igor Sysoev 采用C语言开发编写 ...
- Mac Nginx 配置文件使用(nginx.conf,包含M系列)
一.Mac Nginx 安装 二.nginx.conf 配置文件使用 配置文件路径为: /usr/local/etc/nginx/nginx.conf# M1 系统路径 /opt/homebrew/e ...
- Nginx配置文件nginx.conf详解
Nginx 总的 配置文件 位置 /usr/local/nginx/conf/nginx.conf nginx 正则匹配 一.正则表达式匹配,其中: 为区分大小写匹配 ~* 为不区分大小写匹配 ! 和 ...
- Nginx配置文件nginx.conf中文详解(转)
######Nginx配置文件nginx.conf中文详解######定义Nginx运行的用户和用户组 user www www;#nginx进程数,建议设置为等于CPU总核心数. worker_pr ...
最新文章
- 小冰数字孪生主播正式上线 全球首创全流程无人化AI直播
- JSTL(fn函数)
- numpy中的axis=0,axis=1
- MySQL Server has gone away报错原因汇总
- 10---Net基础加强
- 7. SQL -- 创建数据库(表,字段)
- 《Python Cookbook 3rd》笔记(3.8):分数运算
- 递增输出链表结点,删除重复结点
- if ,else if ,else 执行过程
- .net core精彩实例分享 -- 应用启动
- 单机 搭建kafka集群 本地_10分钟搭建单机Kafka集群
- Vue插槽(solt)简单案例
- .net Remoting与Web Service的比较
- 问题处理:VMware Workstation和Device / Credential Guard不兼容
- 实战Java商品库存管理系统
- java程序员待遇怎么样_上海海文告诉你Java程序员工资待遇到底如何
- 65个最常见的面试问题与技巧性答复(面试技巧和注意事项),很不错,求职之前,多看看
- 用Python获取照片GPS信息
- python编程15章_python核心编程2 第十五章 练习
- iphone输入法换行_iphone打字怎么换行?iphone输入法换行教程
热门文章
- SAP-ABAP三种定义嵌套型结构的方法
- OBYC中的GBB一般修改的解释
- IDOC实例,消息方式的IDOC
- “苹果光环”褪色后,瑞声靠什么坐稳头把交椅?
- 佛媛之后又产“新妖”,抖音、快手出马,依旧掐不灭鬼怪们的妖火
- 细分领域继续进击,海尔电器寻退市增效?
- root域名服务器 gtld服务器_购买阿里云域名和空间服务器实操
- linux 杂项设备,Linux下自动创建节点的字符杂项设备 misc_register
- centos系统中mysql密码_CentOS系统找回mysql登录密码
- 通Python实现操作 excel表格 工作效率提升百倍