文章 2022-02-16 来自:开发者社区

nginx lua 小项目:根据 user_agent 显示不同的页面,附带和 php 性能的对比

怎么快速学习一门新的语言呢?如果你已经熟练掌握了一门语言,那么其他语言都是想通的。一个小小的需求,可能会遇到很多问题,但是搜索相关的关键字,就能快速实现出来,完成一个小目标,事半功倍。死记硬背手册,太枯燥了,反正我是看不下去,不如直接来个小项目。 一个小需求 pc、mobile 一个地址有两套页面,需要在后端根据浏览器的 user_agent 来显示不同的页面。通过 php 来做,当然可以,但是....

问答 2022-02-15 来自:开发者社区

在linux上的nginx服务器部署vue项目,只能访问到首页,其他页面404

在本地用npm run build 命令把项目打包,然后把打包项目压缩dist.zip文件上传到服务器上,解压在/usr/local/nginx/(新创建)root/data 下。(打包前仅仅把这修改成./ 了,还有下面build中的也修改了./) 在nginx.config 配置文件修改。 之后启动nginx服务器,可以通过ip/ 重定向到ip/blogs 页面。 但是报错,在...

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

产品推荐

{"cardStyle":"productCardStyle","productCode":"aliyun","productCardInfo":{"productTitle":"部署Nginx并通过Ingress暴露和监控服务","productDescription":"在阿里云容器服务(后简称ACK)集群中通过YAML文件快速部署一个Nginx应用并通过Nginx Ingress暴露和监控服务,结合使用ACK、日志服务、专有网络搭建业务部署运维方案。","productContentLink":"https://www.aliyun.com/solution/tech-solution/nginx_ingress","isDisplayProductIcon":true,"productButton1":{"productButtonText":"方案详情","productButtonLink":"https://www.aliyun.com/solution/tech-solution/nginx_ingress"},"productButton2":{"productButtonText":"一键部署","productButtonLink":"https://help.aliyun.com/document_detail/2400022.html"},"productButton3":{"productButtonText":"查看更多技术解决方案","productButtonLink":"https://www.aliyun.com/solution/tech-solution/"},"productPromotionInfoBlock":[{"$id":"0","productPromotionGroupingTitle":"解决方案推荐","productPromotionInfoFirstText":"MSE实现全链路灰度","productPromotionInfoFirstLink":"https://www.aliyun.com/solution/tech-solution/iflgbomse","productPromotionInfoSecondText":"云架构必修课:云上高可用架构","productPromotionInfoSecondLink":"https://www.aliyun.com/solution/tech-solution/hablog"}],"isOfficialLogo":false},"activityCardInfo":{"activityTitle":"","activityDescription":"","cardContentBackgroundMode":"LightMode","activityContentBackgroundImageLink":"","activityCardBottomInfoSelect":"activityPromotionInfoBlock"}}