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

山西教育平台网站建设商务之家网

山西教育平台网站建设,商务之家网,编程入门先学什么scratch,广州网站开发哪家强测试过程中需要在大量资源之间跳转,频繁的点击不如直接搜索来的快,于是写了一个搜索框方便跳转。 前端的静态页面可以通过s3静态网站托管实现,但是由于中国区需要备案的原因,可以使用ecs fargate部署 步骤如下: 编写…

测试过程中需要在大量资源之间跳转,频繁的点击不如直接搜索来的快,于是写了一个搜索框方便跳转。

前端的静态页面可以通过s3静态网站托管实现,但是由于中国区需要备案的原因,可以使用ecs fargate部署

步骤如下:

  • 编写前端页面,打包镜像
  • 使用任务定义创建ecs fargate服务

编写页面和打包镜像

编写页面

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>ToImage</title><style>* {margin: 0;padding: 0;}.container {height: 300px;width: 100%;margin: 100px auto 0 auto;}.parent {position: relative;top: 50%;left: 30%;}.search1 {width: 650px;height: 50px;border-radius: 18px;outline: none;border: 1px solid #ccc;padding-left: 20px;padding-right: 100px;position: absolute;font-size: 20px;}.search2 {width: 650px;height: 50px;border-radius: 18px;outline: none;border: 1px solid #ccc;padding-left: 20px;padding-right: 100px;position: absolute;top: 60px;font-size: 20px;}.btn {height: 36px;width: 100px;position: absolute;background: #fff;top: 120px;left: 300px;border: none;outline: none;font-size: 20px;}</style>
</head><body><div class="container"><form id="awsform" class="parent" method="get" ><input id="servicename" type="text" class="search1" placeholder="Please Input ServiceName..." name="servicename" /><input id="serviceid" type="text" class="search2" placeholder="Please Input ServiceID..." name="serviceid" /><input type="button" class="btn" value="Search" onclick="jssubmit()"/></form></div><script type="text/javascript">function jssubmit() {var formdom = document.getElementById('awsform');var servicename = document.getElementById("servicename").valuevar serviceid = document.getElementById("serviceid").valueconsole.log(serviceid)switch(servicename){case "role":window.location.href = "https://cn-north-1.console.amazonaws.cn/iamv2/home?region=cn-north-1#/roles/details/" + serviceid; break;case "user":window.location.href = "https://cn-north-1.console.amazonaws.cn/iamv2/home?region=cn-north-1#/users/details/" + serviceid; break;case "ec2":window.location.href = "https://cn-north-1.console.amazonaws.cn/ec2/v2/home?region=cn-north-1#InstanceDetails:instanceId=" + serviceid; break;case "eni":window.location.href = "https://cn-north-1.console.amazonaws.cn/ec2/v2/home?region=cn-north-1#NetworkInterface:networkInterfaceId" + serviceid; break;case "sg":window.location.href = "https://cn-north-1.console.amazonaws.cn/ec2/v2/home?region=cn-north-1#SecurityGroup:groupId=" + serviceid; break;case "ebs":window.location.href = "https://cn-north-1.console.amazonaws.cn/ec2/v2/home?region=cn-north-1#VolumeDetails:volumeId=" + serviceid; break;case "vpc":window.location.href = "https://cn-north-1.console.amazonaws.cn/ec2/v2/home?region=cn-north-1#VolumeDetails:volumeId=" + serviceid; break;case "subnet":window.location.href = "https://cn-north-1.console.amazonaws.cn/vpc/home?region=cn-north-1#SubnetDetails:subnetId=" + serviceid; break;case "s3":window.location.href = "https://cn-north-1.console.amazonaws.cn/s3/buckets/" + serviceid ; break;case "eks":window.location.href = "https://cn-north-1.console.amazonaws.cn/eks/home?region=cn-north-1#/clusters/" + serviceid ; break;}return false}</script>
</body></html>

本地测试

docker run -it --rm -p 8000:80 -v /home/ec2-user/index.html:/usr/share/nginx/html/index.html  nginx:alpine-slim

修改端口为8090

// default.conf
server {listen       8090;server_name  localhost;#access_log  /var/log/nginx/host.access.log  main;location / {root   /usr/share/nginx/html;index  index.html index.htm;}#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 Apache's document root# concurs with nginx's one##location ~ /\.ht {#    deny  all;#}
}

打包镜像

FROM nginx:alpine-slim
COPY ./index.html /usr/share/nginx/html/index.html
COPY ./default.conf /etc/nginx/conf.d/default.conf

创建服务

在这里插入图片描述

访问跳转

在这里插入图片描述

http://www.yayakq.cn/news/553631/

相关文章:

  • 点样做网站网站设计模板图
  • 宁波建设工程学校网站建设投票网站的目的
  • 免费网站正能量软件怎么做一个聊天软件
  • 上海网站推广一条龙做网站
  • 网站开发技术 下载windows优化大师收费吗
  • 网站功能需求分析文档百度推广网络推广微信网站
  • linux网站做301重定向网页制作手机版下载
  • 网站可信认证wordpress首页评论
  • 营销型网站建设必备功能网页素材制作
  • 图片设计制作网站长春建站方法
  • 营销型网站服务网站短信验证怎么做
  • 不用买服务器可以做网站关键词优化过程
  • 邢台123式的网站怎么做漳州企业网站建设
  • 厦门网站建设推荐杭州网络科技网站
  • 网站建设全包公司推荐如何在各个购物网站之间做差价
  • 爱情表白制作网页的网站爱装网
  • 公司没有备案了网站广告设计入门到精通
  • 商旅网站制作百度下载免费
  • 上海网站建设解决方案微信公众号需要开发吗
  • 购物类网站都有哪些模块广西腾达建设集团有限公司网站
  • 建设精品课程网站的意义手机端搜索引擎排名
  • 上海福州路附近做网站的公司wordpress企业网站模板破解
  • 常州网站建设包括哪些哪些广告平台留号码
  • 如何推广自己的外贸网站怎么一键删除wordpress
  • 北京网站建设企业关于网站建设的书籍
  • 安网站建设卖家电商平台有哪些
  • 深圳市房产管理局官方网站网站建站六个目标
  • 个人网站用什么域名好微信在线登录网页版
  • 具有品牌的常州做网站建设工程服务平台
  • IT男网站建设网站建设文件夹结构