搭建nginx 服务器【windows server 2012】
2022/2/3 7:12:28
本文主要是介绍搭建nginx 服务器【windows server 2012】,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
内卷 时代来喽!
请看大黑板=? nginx !? ?
相信很多朋友在搭建nginx ,部署vue服务的时候会遇到许多细节问题,有的可能会搞个很久…也没搞出来
咳咳!但你遇到了我,这么都不是问题哟!!!
一、下载nginx
nginx官网
nginx.conf文件配置(核心配置)
最容易出错的是路径问题,需要特别注意
server { listen 443 ssl; listen 80; server_name www.xxxx.org.cn;#更换自己的域名 rewrite ^(.*)$https://$server_name$1 permanent; #强制跳转https ssl_certificate server.crt;#更换ssl crt 默认放在conf目录下 ssl_certificate_key server.key;#更换ssl key 默认放在conf目录下 root html/dist; index index.html index.htm; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; location / { root html/dist; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html/dist; } }
这篇关于搭建nginx 服务器【windows server 2012】的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-09-17Nginx实用篇:实现负载均衡、限流与动静分离
- 2024-08-21宝塔nginx新增8022端口方法步骤-icode9专业技术文章分享
- 2024-08-21nginx配置,让ws升级为wss访问的方法步骤-icode9专业技术文章分享
- 2024-08-15nginx ws代理配置方法步骤-icode9专业技术文章分享
- 2024-08-14nginx 让访问带有/relid的地址返回404 ,例子 /relid-x-0.36-y-131.html-icode9专业技术文章分享
- 2024-08-14nginx 判断地址有/statics/的路径,指向到/home/html/statics/目录-icode9专业技术文章分享
- 2024-07-24解锁Nginx日志的宝藏:GoAccess——你的实时、交互式Web日志分析神器!
- 2024-03-29fail2ban nginx
- 2024-03-18install nginx proxy manager
- 2024-01-2444从零开始用Rust编写nginx,命令行参数的设计与解析及说明