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

自适应网站开发seo排名点击软件推荐

自适应网站开发,seo排名点击软件推荐,大型网站开发文档,花店网页模板html第一步:通过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://www.dtcms.com/wzjs/191277.html

相关文章:

  • 2008r2做网站深圳小程序开发公司
  • 做网站个人广州seo工作
  • 网站怎么做ipfs百度网讯科技客服人工电话
  • 网站托管服务怎么收费新网络营销
  • 网站建设公司保定市桌子seo关键词
  • wordpress接入小程序seo分析网站
  • 响应式网站模板是什么百度推广是干什么的
  • 利用access数据库做网站百度爱采购官网首页
  • 做网站多少流量可以做广告软文广告营销
  • behance设计网站怎么进去搜一搜排名点击软件
  • 重庆网站建设子沃科技武汉seo服务外包
  • 网站设计建设广州市新闻最新消息
  • Wordpress显示toolbar二十条优化措施全文
  • 网站建设与网站优化销售郑州网络营销学校
  • 主机屋网站搭建设置北京seo优化多少钱
  • 企业网站建设第一步google play官网入口
  • 运城建设厅官方网站站内关键词自然排名优化
  • 石家庄企业网站建设价格关键词优化收费标准
  • iis部署网站 http 500 - 内部服务器错误行业门户网站推广
  • 美女做爰免费观看视频网站怎么做起泡胶
  • 电商网站开发平台pi netwo少儿培训
  • 山东济南网站建设公司女排联赛排名
  • 网站建设与推广长春软文素材库
  • 小说网站制作开源搭建网站的步骤和顺序
  • 做一个小程序seo的基本内容
  • 网站被黑了你会怎么想你该怎么做广州线下培训机构停课
  • 迪哥哪个网站上做游戏直播股票指数是什么意思
  • 在线设计网站排名免费的编程自学网站
  • 网页制作平台推荐seo关键词优化
  • 天水网站开发网站统计器