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

大连网站建设报价wordpress onepager

大连网站建设报价,wordpress onepager,外贸建站 宁波,海南专业做网站的公司说明一下#xff1a; 本人原本使用的是docker安装nginx通过挂载实现部署#xff0c;但是出现了很多bug#xff08;例如部署安全证书后还是无法访问#xff09;#xff0c;所以困扰了很久#xff0c;最后改为本地安装nginx#xff0c;最终在不懈的努力下终于按照好了 本人原本使用的是docker安装nginx通过挂载实现部署但是出现了很多bug例如部署安全证书后还是无法访问所以困扰了很久最后改为本地安装nginx最终在不懈的努力下终于按照好了特此记录一下。 一整个流程 1. 将前端项目打包会生成dist文件同时不要忘了修改调用后台的ip 2. 安装nginx本地安装非docker然后将dist下的文件放入nginx的html目录下 3. 配置nginx的配置文件 4. 安装证书ssl 安装nginxssl参考https://blog.csdn.net/oYingJie1/article/details/127700897 下载及安装ssl参考https://blog.csdn.net/qq_42320934/article/details/120655799 二 附上关键代码及说明 1.nginx的配置文件 #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;#将所有HTTP请求通过rewrite指令重定向到HTTPS。rewrite ^(.*)$ https://$host$1;#charset koi8-r;#access_log logs/host.access.log main;location / {root html;index index.html index.htm;}location /undefined/ {proxy_pass http://s11.s100.vip:35053;proxy_redirect default;rewrite ^/undefined/(.*) /$1 break;}#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 Apaches document root# concurs with nginxs 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;}location /undefined/ {proxy_pass http://s11.s100.vip:35053;proxy_redirect default;rewrite ^/undefined/(.*) /$1 break;}}}2. 以前docker配置的文件 user nginx; worker_processes auto;error_log /var/log/nginx/error.log notice; pid /var/run/nginx.pid;events {worker_connections 1024; }http {include /etc/nginx/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 /var/log/nginx/access.log main;sendfile on;#tcp_nopush on;keepalive_timeout 65;#gzip on;include /etc/nginx/conf.d/*.conf;server {listen 80;listen [::]:80;server_name www.slgstu.top;#将所有HTTP请求通过rewrite指令重定向到HTTPS。 # rewrite ^(.*)$ https://$host$1;#access_log /var/log/nginx/host.access.log main;location / {root /usr/share/nginx/html;index index.html index.htm;}location /undefined/ {proxy_pass http://s11.s100.vip:35053;proxy_redirect default;rewrite ^/undefined/(.*) /$1 break;}#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 /usr/share/nginx/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 Apaches document root# concurs with nginxs one##location ~ /\.ht {# deny all;#} }server {#HTTPS的默认访问端口443。#如果未在此处配置HTTPS的默认访问端口可能会造成Nginx无法启动。listen 443 ssl;#填写证书绑定的域名server_name www.slgstu.top;#填写证书文件名称ssl_certificate cert/www.slgstu.top.cer;#填写证书私钥文件名称ssl_certificate_key cert/www.slgstu.top.key;ssl_session_cache shared:SSL:1m;ssl_session_timeout 5m;# 指定密码为openssl支持的格式ssl_protocols SSLv2 SSLv3 TLSv1.2;ssl_ciphers HIGH:!aNULL:!MD5; # 密码加密方式ssl_prefer_server_ciphers on; # 依赖SSLv3和TLSv1协议的服务器密码将优先于客户端密码location / {root /usr/share/nginx/html;index index.html index.htm;} }} 3.说明下nginx的文件作用 cert放https证书的两个文件 conf nginx的一些配置文件主要还是使用nginx.conf html默认的话nginx会加载html文件下的index.html log查看成功与错误日志
http://www.hkea.cn/news/14334561/

相关文章:

  • 网站建设安排总结微信二维码无法打开网页 为什么
  • 什么是开放式的网站wordpress移动端底部导航栏
  • 网站正在建设代码镇江网站制作企业网站
  • 建设网站是不是要买服务器51素材免费下载
  • 学校网站建设实训做3d兼职网站
  • 诛仙3官方网站做花灯答案百度做网站刷排名
  • 页面设计网站素材企业信用信息系统
  • 建设网站包维护上海网站群建设
  • 广州网站建设公司哪家比较好微信公众号的子菜单网页怎么制作
  • 访问网站的原理网站后台地址修改
  • 成都微信网站建设报价单网页制作模板dw
  • 做外贸有哪些好的网站北京性价比网站建设
  • 太原网站建设开发公司宁夏石嘴山市城乡建设局提意见网站
  • 网站建设 会计科目济南做网站多钱
  • 网站的网页建设知识ppt南宁哪里有做开通网站的
  • 左旗网站建设软件开发哪家公司好
  • 如何做漫画网站wordpress ffmpeg
  • 深圳罗湖高端网站建设聊网站推广
  • 前端网站效果有哪些淘宝官网首页登录
  • 网站开发人员分工网站建设服务器一般多少钱
  • 创建购物网站成都网站建设58
  • 网站建设推广信息天猫商城官网下载
  • 天马网络 网站建设免费自助建站系统平台 贴吧
  • 微信网站apippt制作方法
  • 岫岩县网站建设建设银行网站服务功能
  • 中国建设积分商城网站免费x网站域名视频
  • 但是网站相关内容和程序并没有建设完_其次网站公司给我公司的朝阳市建设厅查询网站
  • php做的网站用什么后台网站备案 图片大小
  • 任丘网站开发建设怎么选山西防疫最新信息
  • 网站建设功能评价指标经典网站