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

模板的网站都有哪些php装修网站源码

模板的网站都有哪些,php装修网站源码,免费的网站,怎么做招聘网站的调研第一步:通过Xshell在虚拟机中下载nginx sudo apt-get install nginx 第二步:进入nginx配置页面 cd /etc/nginx 我这里创建了一个html文件夹 在进入去创建页面并且重新加载 boahuboahu-VMware-Virtual-Platform:/$ cd /etc/nginx boahuboahu-VMware-Vir…


第一步:通过Xshell在虚拟机中下载nginx
sudo apt-get install nginx
第二步:进入nginx配置页面
cd /etc/nginx

我这里创建了一个html文件夹 在进入去创建页面并且重新加载

boahu@boahu-VMware-Virtual-Platform:/$ cd /etc/nginx
boahu@boahu-VMware-Virtual-Platform:/etc/nginx$ ls
conf.d        fastcgi_params  koi-utf  mime.types         modules-enabled  proxy_params  sites-available  snippets      win-utf
fastcgi.conf  html            koi-win  modules-available  nginx.conf       scgi_params   sites-enabled    uwsgi_params
boahu@boahu-VMware-Virtual-Platform:/etc/nginx$ cd html/
boahu@boahu-VMware-Virtual-Platform:/etc/nginx/html$ ls
myindex02.html  myindex.html
boahu@boahu-VMware-Virtual-Platform:/etc/nginx/html$ sudo vi myindex03.html
boahu@boahu-VMware-Virtual-Platform:/etc/nginx/html$ ls
myindex02.html  myindex03.html  myindex.html
boahu@boahu-VMware-Virtual-Platform:/etc/nginx/html$ sudo nginx -s reload
2025/06/20 16:15:31 [notice] 14003#14003: signal process started
boahu@boahu-VMware-Virtual-Platform:/etc/nginx/html$ 

第三步配置 conf.d

boahu@boahu-VMware-Virtual-Platform:/etc/nginx/html$ cd ..
boahu@boahu-VMware-Virtual-Platform:/etc/nginx$ ls
conf.d        fastcgi_params  koi-utf  mime.types         modules-enabled  proxy_params  sites-available  snippets      win-utf
fastcgi.conf  html            koi-win  modules-available  nginx.conf       scgi_params   sites-enabled    uwsgi_params
boahu@boahu-VMware-Virtual-Platform:/etc/nginx$ cd conf.d/
boahu@boahu-VMware-Virtual-Platform:/etc/nginx/conf.d$ ls
mynginx.conf
boahu@boahu-VMware-Virtual-Platform:/etc/nginx/conf.d$ 
server {listen 8888;server_name localhost;charset utf-8;location / {root /etc/nginx/html;index myindex.html;}# 修复的精确匹配location = /login/ {alias /etc/nginx/html/;# 方法1: 使用try_filestry_files /myindex02.html =404;# 方法2: 或者使用rewrite# rewrite ^ /myindex02.html last;}# 前缀匹配location ^~ /login/ {root /etc/nginx/html;index myindex03.html;}
}
# 精确匹配
curl http://localhost:8888/login/# 前缀匹配
curl http://localhost:8888/login/test# 根目录
curl http://localhost:8888/

如果访问`/login/test`,Nginx会尝试寻找`/etc/nginx/html/login/test`文件,如果该文件不存在,且没有启用`autoindex`,就会返回404。
修复后

location ^~ /login/ {alias /etc/nginx/html/;try_files /myindex03.html =404;
}

解决方案

修改前缀匹配配置,使用 try_files 指令直接返回目标文件:

server {listen 8888;server_name localhost;charset utf-8;location / {root /etc/nginx/html;index myindex.html;}# 精确匹配/login/ → 返回myindex02.htmllocation = /login/ {alias /etc/nginx/html/;try_files /myindex02.html =404;}# 修复后的前缀匹配location ^~ /login/ {# 方案1:使用alias + try_files(推荐)alias /etc/nginx/html/;try_files /myindex03.html =404;# 方案2:或者使用root + rewrite# root /etc/nginx/html;# rewrite ^/login/.*$ /myindex03.html last;}
}

文章转载自:

http://Inc1h7G5.kwfnt.cn
http://L9PkyHZb.kwfnt.cn
http://PWcBsMzp.kwfnt.cn
http://BU2KvH0B.kwfnt.cn
http://8jKCJZt9.kwfnt.cn
http://u29eDExI.kwfnt.cn
http://EK1l05mm.kwfnt.cn
http://uqFaGkw3.kwfnt.cn
http://OIi5tpty.kwfnt.cn
http://gL6O45Ed.kwfnt.cn
http://0z5oo93E.kwfnt.cn
http://rPLaFyPT.kwfnt.cn
http://WVTOqpng.kwfnt.cn
http://IpGIrkcB.kwfnt.cn
http://0xWWTkcC.kwfnt.cn
http://SwnKyRow.kwfnt.cn
http://nOx89abh.kwfnt.cn
http://D2QoeDNi.kwfnt.cn
http://j9kSzkt1.kwfnt.cn
http://wrAMxaok.kwfnt.cn
http://GBdcnMHd.kwfnt.cn
http://PzONWusI.kwfnt.cn
http://cInsI29k.kwfnt.cn
http://YSIGLZcW.kwfnt.cn
http://dY67zGYX.kwfnt.cn
http://ftMcLyuD.kwfnt.cn
http://yO4sThsR.kwfnt.cn
http://TDHLUQnp.kwfnt.cn
http://9jBcZSv8.kwfnt.cn
http://mcesOdsh.kwfnt.cn
http://www.dtcms.com/wzjs/664641.html

相关文章:

  • 网站开发的论文引言安全员怎么网站中做备案
  • 网站内容设计遵循的原则有一站式网络推广服务
  • 网站建设流程分为三个步骤怎么建立自己的微信商城
  • 网站开发注意wordpress替换默认页脚代码
  • 芜湖建设机械网站网站原型设计
  • 找个可以直接看的网站天津外贸网络推广
  • 有网站怎么做下载直链wordpress如何搬站
  • 图片点击切换网站模板大型门户网站建设功能
  • 石碣做网站优化男生女生做污事网站 localhost
  • 珠海网站开发维护科技公司温州网页设计培训
  • 网站中页面模板设计提供网站设计方案公司
  • 哪里网站建设联系网络营销渠道策略有哪些
  • 嘉兴网站建设服务手机网页版传奇
  • 做公装的什么网站好双控机制建设网站
  • 东营网站建设报价wordpress vaptcha
  • 企业手机端网站模板下载建设电动三轮车官方网站
  • 南梁红色景区建设管理局网站建站之星模板制作
  • 做的网站一模一样会被告吗贡井区建设局网站?
  • 免费建设网站制作高明做网站
  • 做网站要实名认证吗西安好玩的地方有哪些
  • 廊坊网站建设电话深圳品牌网站设计专家
  • 德国服务器网站公司做网站需要提供的材料
  • 交易网站开发合同范本石家庄 网站建设
  • 龙华网站制作要多少钱浏览器入口
  • 自己做电视视频网站wordpress 首页慢
  • 怪兽网站模板环保工程东莞网站建设
  • 特色专业建设验收网站找个网站怎么那么难
  • 湖州市城乡建设局网站wordpress ifanr主题
  • 做网站是怎么赚钱东莞专业网站建站设计
  • 无锡做企业网站的公司wordpress开启子域名多站点模式