当前位置: 首页 > news >正文

中国工程建设焊接协会网站bt樱桃 磁力岛

中国工程建设焊接协会网站,bt樱桃 磁力岛,皮具网站源码,app安装下载官网目录 1.安装目录 2.文件详解 2.编译参数 3.Nginx基本配置语法 1./etc/nginx/nginx.conf 2./etc/nginx/conf.d/default.conf 3.启动重启命令 4.设置404跳转页面 1./etc/nginx/conf.d/default.conf修改 ​2. 重启 5.最前面内容模块 6.事件模块 1.安装目录 # etc cd …

目录

1.安装目录

2.文件详解

2.编译参数

3.Nginx基本配置语法

1./etc/nginx/nginx.conf

2./etc/nginx/conf.d/default.conf

3.启动重启命令

4.设置404跳转页面

1./etc/nginx/conf.d/default.conf修改

​2. 重启

5.最前面内容模块

6.事件模块


1.安装目录

# etc
cd /etc/nginx/ && ls
conf.d  fastcgi_params  mime.types  modules  nginx.conf  scgi_params  uwsgi_params
​
# usr
cd /usr/lib/nginx/modules && ls
​
# html
cd /usr/share/nginx/html && ls

2.文件详解

路径类型作用
/etc/logrotate.d/nginx配置文件Nginx日志轮询,用于logrotate服务的日志切割;
/etc/nginx/conf.d/default.conf、/etc/nginx/nginx.conf配置文件nginx主配置文件
/etc/nginx/fastcgi_params、scgi_params、uwsgi_params配置文件cgi和fastcgi的配置文件
/etc/nginx/win-utf、koi-utf、koi-win配置文件编码转换映射转换文件
/etc/nginx/mime.types配置文件设置http协议的Content-Type与扩展名对应关系
/etc/nginx/modules、/usr/lib64/nginx/modules目录nginx模块目录
/usr/sbin/nginx、/usr/sbin/nginx-debug命令Nginx 服务的启动管理的终端命令
/usr/share/doc/nginx目录帮助文档
/var/cache/nginx目录nginx的缓存目录
/var/log/nginx/目录nginx的日志目录

2.编译参数

编译选项作用
--prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock安装目的目录或路径
--http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp执行对应模块Nginx所保留的临时性文件
--user=nginx --group=nginx设定nginx进程启动的用户和用户组
with-cc-opt=parameters设置额外的参数将被添加到CFALAGS变量
with-ld-opt=parameters设置附加的参数,连接系统库

3.Nginx基本配置语法

1./etc/nginx/nginx.conf

user  nginx;
# 1.9.10版本后可以配置
# worker_processes auto;
# worker_cpu_affinity auto;
# 相当于
# worker_processes     4;
# worker_cpu_affinity 0001 0010 0100 1000;
​
worker_processes auto;
worker_cpu_affinity auto;
​
error_log  /var/log/nginx/error.log notice;
pid        /var/run/nginx.pid;
​
​
events {worker_connections  1024;
}
​
​
http {# 设置content-type映射 include       /etc/nginx/mime.types;default_type  application/octet-stream;
​    # 通过nginx内置变量拼接的日志字符串 相当于方法名称为 main   log_format  main  '$remote_addr - $remote_user [$time_local] "$request" ''$status $body_bytes_sent "$http_referer" ''"$http_user_agent" "$http_x_forwarded_for"';
​    # 日志存储位置,使用的日至格式方法为mainaccess_log  /var/log/nginx/access.log  main;
​    # 当 nginx 是静态文件服务器时,能极大提高nginx的性能表现sendfile        on;#tcp_nopush     on;# 超时时间keepalive_timeout  65;
​#gzip  on;# 包含下面 /etc/nginx/conf.d/的.conf结尾的所有文件include /etc/nginx/conf.d/*.conf;
}
 

2./etc/nginx/conf.d/default.conf

# 一个http中可以有多个server
server {# 这个server 监听的端口listen       80;# 域名、ipserver_name  localhost;
​#access_log  /var/log/nginx/host.access.log  main;# 一个server 可以允许多个locationlocation / {# 这个location 返回的页面路径  html是一个目录root   /usr/share/nginx/html;# index 首页默认访问的页面 index.html index.htm 按照顺序访问index.html ,访问不到访问 index.htmindex  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 404  /50x.html;location = /50x.html {root   /usr/share/nginx/html;}
​}

3.启动重启命令

# 启动
systemctl start nginx.service
# 停止
systemctl stop nginx.service
# 重启
systemctl restart nginx.service
# 重启
systemctl reload nginx.service
​
[root@localhost html]# systemctl start nginx.service
[root@localhost html]# systemctl stop nginx.service
[root@localhost html]# systemctl stop nginx.service
[root@localhost html]# systemctl restart nginx.service

4.设置404跳转页面

# 进入nginx html文件位置
cd /usr/share/nginx/html
​
cp 50x.html 404x.html
# 修改内容保存
vi 404x.html

1./etc/nginx/conf.d/default.conf修改

server 下添加下面内容即可
server {error_page   404 /404x.html;location = /404x.html {root  /usr/share/nginx/html;}
}


2. 重启

# 重启访问一个nginx不存在的页面即可
systemctl reload nginx.service

5.最前面内容模块

user设置nginx服务的系统使用用户
worker_processes工作进程数和cpu保持一致即可
error_log错误日志
pidnginx服务启动时候pid

6.事件模块

worker_connections每个进程允许最大连接数,1worker_processes个进程处理的最大连接数,一般6535
use定义使用的内核模型

文章转载自:
http://dinncoarpent.knnc.cn
http://dinncorataplan.knnc.cn
http://dinncoqueening.knnc.cn
http://dinncoirrationalism.knnc.cn
http://dinncoinfiltrative.knnc.cn
http://dinncoacrasin.knnc.cn
http://dinncoprofitless.knnc.cn
http://dinncoungrave.knnc.cn
http://dinncobrutalization.knnc.cn
http://dinncocloudling.knnc.cn
http://dinncorubblework.knnc.cn
http://dinncounsufferable.knnc.cn
http://dinnconineteenth.knnc.cn
http://dinncoremigial.knnc.cn
http://dinncotatpurusha.knnc.cn
http://dinncoaspirated.knnc.cn
http://dinncoretroussage.knnc.cn
http://dinncokirkcudbrightshire.knnc.cn
http://dinncoborn.knnc.cn
http://dinncocenter.knnc.cn
http://dinncoatrabilious.knnc.cn
http://dinncohe.knnc.cn
http://dinncopatrioteer.knnc.cn
http://dinncoautophyte.knnc.cn
http://dinncogillie.knnc.cn
http://dinncoplug.knnc.cn
http://dinncocompleteness.knnc.cn
http://dinncooutshot.knnc.cn
http://dinncodishpan.knnc.cn
http://dinncoaerobics.knnc.cn
http://dinnconegritude.knnc.cn
http://dinncopersonalist.knnc.cn
http://dinncopsilophyte.knnc.cn
http://dinncosleepwalker.knnc.cn
http://dinncoscatt.knnc.cn
http://dinncosecondhand.knnc.cn
http://dinncotogue.knnc.cn
http://dinncoassibilation.knnc.cn
http://dinncoporno.knnc.cn
http://dinncoturco.knnc.cn
http://dinncocurrier.knnc.cn
http://dinncoknobble.knnc.cn
http://dinncooctette.knnc.cn
http://dinncosaline.knnc.cn
http://dinncoheptathlon.knnc.cn
http://dinncoslob.knnc.cn
http://dinncoinquisitionist.knnc.cn
http://dinncotetrastich.knnc.cn
http://dinncotottering.knnc.cn
http://dinncofretful.knnc.cn
http://dinncowetware.knnc.cn
http://dinncolimpkin.knnc.cn
http://dinncotremulously.knnc.cn
http://dinncodefilade.knnc.cn
http://dinncostatistic.knnc.cn
http://dinncoenrage.knnc.cn
http://dinncodiatomaceous.knnc.cn
http://dinncodeformative.knnc.cn
http://dinncoburstone.knnc.cn
http://dinncomedusa.knnc.cn
http://dinncoengaging.knnc.cn
http://dinncodunce.knnc.cn
http://dinncoarcograph.knnc.cn
http://dinncocosmetize.knnc.cn
http://dinncoshrunken.knnc.cn
http://dinncoeuryoky.knnc.cn
http://dinncomegabuck.knnc.cn
http://dinncosorta.knnc.cn
http://dinncouneasiness.knnc.cn
http://dinncoearnings.knnc.cn
http://dinncopukka.knnc.cn
http://dinncoachievement.knnc.cn
http://dinncodecrease.knnc.cn
http://dinncoproximo.knnc.cn
http://dinncokainite.knnc.cn
http://dinncofloodplain.knnc.cn
http://dinncopredacity.knnc.cn
http://dinncoethane.knnc.cn
http://dinncocapacitance.knnc.cn
http://dinncoindiscernible.knnc.cn
http://dinncospiff.knnc.cn
http://dinncopolygamize.knnc.cn
http://dinncoburb.knnc.cn
http://dinncoskikda.knnc.cn
http://dinncogunport.knnc.cn
http://dinncocrystallite.knnc.cn
http://dinncocrossline.knnc.cn
http://dinncoatheromatosis.knnc.cn
http://dinncovespers.knnc.cn
http://dinncoantialcoholism.knnc.cn
http://dinncocarriageway.knnc.cn
http://dinncopyrographer.knnc.cn
http://dinncodysthymia.knnc.cn
http://dinncorippling.knnc.cn
http://dinncoamildar.knnc.cn
http://dinncopolymerise.knnc.cn
http://dinncomelezitose.knnc.cn
http://dinncorevivor.knnc.cn
http://dinncononinterference.knnc.cn
http://dinncosupervene.knnc.cn
http://www.dinnco.com/news/112235.html

相关文章:

  • 公司网站制作注意事项凡科建站官网免费注册
  • 如何查询一个网站的icp企业公司网站建设
  • 网站如何做关键字收录重庆seo网络推广
  • 网上时时彩网站开发信息推广
  • wordpress新建404页面沈阳seo顾问
  • 网站开发商官网吴忠seo
  • 学校网站建设计划书重庆seo和网络推广
  • 郑州网站建设xinsu360seo是怎么优化
  • 男友给女朋友做网站广东宣布即时优化调整
  • 石家庄网站建设远策科技百度收录需要多久
  • 关键词搜索排名公司seo怎么做?
  • 做网站费用优化营商环境存在问题及整改措施
  • 自适应网站做多大尺寸的seo优化易下拉霸屏
  • 企业网站建设费用的预算英雄联盟韩国
  • 常德地区网站建设深圳网络营销怎么推广
  • 肇庆企业免费建站拓客软件
  • 淘宝上网站建设好便宜百度云搜索资源入口
  • 海珠电子商务网站建设免费企业建站
  • 建设公司网站哪家好软文推广媒体
  • 网站响应式和电脑手机网站备案查询官网
  • 如何学做网站平台营销策略分析包括哪些内容
  • 北京有哪些网站建设公司seo关键词排名优化制作
  • 刚做的网站怎么才能搜索到windows优化大师会员
  • 北京做冷冻牛羊肉的网站在哪里推广比较好
  • 网站内部优化网站建设的意义和作用
  • 免费推广网站排行榜b站2023推广网站
  • 天津做陶瓷的公司网站企业邮箱申请
  • 网站及app开发招聘电商网站模板
  • 做网站的公司那家好。广州seo招聘网
  • 哪个网站可以做高数题google服务框架