第一 先安装nginx

第二 修改nginx配置

# vim /usr/local/nginx/conf/nginx.conf#配置用户和用户组
#user  nobody;
#工作进程数,建议设置为CPU的总核数
worker_processes  4;
#全局错误日志定义类型,日志等级从低到高依次为: debug | info | notice | warn | error | crit
#error_log  logs/error.log;
#error_log  logs/error.log  notice;
error_log  logs/error.log  info;
#记录主进程ID的文件
#pid        logs/nginx.pid;
#工作模式与连接数上限
events {#单个进程允许的最大连接数worker_connections  1024;
}
#设定http服务器,利用它的反向代理功能提供负载均衡支持
http {#文件扩展名与文件类型映射表include       mime.types;#默认文件类型default_type  application/octet-stream;#日志格式log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '#                  '$status $body_bytes_sent "$http_referer" '#                  '"$http_user_agent" "$http_x_forwarded_for"';#access log 记录了哪些用户,哪些页面以及用户浏览器、ip和其他的访问信息access_log  logs/access.log  main;#开启文件传输,一般应用都应设置为on;若是有下载的应用,则可以设置成off来平衡网络I/O和磁盘的I/O来降低系统负载sendfile        on;#告诉nginx在一个数据包里发送所有头文件,而不一个接一个的发送。#tcp_nopush     on;#长连接超时时间,单位是秒#keepalive_timeout  0;keepalive_timeout  65;### gzip模块设置,使用 gzip 压缩可以降低网站带宽消耗,同时提升访问速度。gzip  on;             #开启gzipgzip_min_length  1k;          #最小压缩大小gzip_buffers     4 16k;        #压缩缓冲区gzip_http_version 1.0;       #压缩版本gzip_comp_level 2;            #压缩等级gzip_types       text/plain application/x-javascript text/css application/xml;           #压缩类型### gzip 模块 end#一台服务器挂了,自动去找另一台服务器,这要使用到proxy_pass#注意:upstream中的server元素必须要注意,不能加http://,但proxy_pass中必须加#upstream toms{# server 47.92.163.127:8080;#} #server 配置 begin,可以配置多个# 包含所有的虚拟主机的配置文件# include conf/mhost/*;server_tokens off;  limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s; server{listen 80;server_name www.xxx.com;limit_req zone=one burst=5;   #最多等待5个请求,多余的拒接access_log  logs/indexaccess.log  main;error_log   logs/indexerror.log;if ($request_method !~ ^(GET|POST)$ ) {return 444;}    location / {# proxy_pass http://toms;root /usr/local/html/dist/static/index/pc/;if ( $http_user_agent ~ "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT-)|(SonyEricsson)|(NEC-)|(Alcatel)|(Ericsson)|(BENQ)|(BenQ)|(Amoisonic)|(Amoi-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(Bird)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(Daxian)|(DAXIAN)|(DBTEL)|(Eastcom)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC-)|(SED-)|(EMOL-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Wget)|(Java)|(curl)|(Opera)" ){root /usr/local/html/dist/static/index/mobile/;}index index.html index.htm;}}server{#admin静态页面listen 80;server_name admin.abc.xxx.com;access_log  logs/frontaccess.log  main;error_log   logs/fronterror.log;location ~ \.(html|js|css|png|jpg|gif|woff|woff2|ttf|apk|ipa)$ {root /usr/local/html/dist/;index index.html index.htm;}location ^~ /api/{proxy_pass http://127.0.0.1:10001/;}}server {listen       80;server_name  back.xxxxx.com;access_log  logs/backaccess.log  main;error_log   logs/backerror.log;location / {proxy_http_version 1.1;proxy_set_header   Host             $host;proxy_set_header   X-Real-IP        $remote_addr;proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;proxy_pass http://127.0.0.1:10001;}}}
# pwd
/usr/local/html/dist
[root@ycz dist]# ls
caizhan99_android.apk  favicon.ico  xy729_?û?_Sh.ipa_1.1.1.ipa
caizhan99_ios.ipa                   index.html
cpw.plist       #IOS安装清单         static

第三  移动端的访问首页文件(index.html)

# pwd
/usr/local/html/dist/static/index/mobile
# vim index.html
<!--* @Descripttion: * @version: * @Author: falost* @LastEditors: falost* @Date: 2019-06-01 10:42:11* @LastEditTime: 2019-06-01 11:48:15-->
<!DOCTYPE html>
<html lang="en">
<head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><meta name="renderer" content="webkit"><meta name="Author" content="观极、Leien"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"><title>99keji下载</title><style>.bg_img {background: url("./bgImg.jpg") no-repeat center;background-size: contain;width: 100%;height: 100%;position: relative;}body,html{margin:0;padding:0;height:100%;}.download_btn{position: relative;left: 50%;top: 85%;width: 150px;text-align: center;padding: 10px 15px;transform: translate(-50%, -50%);border-radius: 5px;margin-top: 5px;color: #fff;background: -webkit-linear-gradient(left top,#dbdcde , #1f3300);}.beian{position: absolute;bottom:15px;left:50%;transform: translateX(-50%) translateY(-50%);color:#fff;font-size:12px;}</style>
</head>
<body><div class="bg_img"><div class="download_btn" onclick="toDownload()">点击下载</div><div class="beian">陕ICP备190xxxx号-1</div></div>
</body>
<script>
//    toDownload();// 新的方法function toDownload(){console.log("ddd");console.log(IsPC());var u = navigator.userAgent;var ua = u.toLowerCase();if (/iphone|ipad|ipod/.test(ua)) {  // iOS 系统 ->  跳AppStore下载地址//alert("iOS");window.location.href = 'itms-services://?action=download-manifest&url=https://www.falost.cc/public/cpw.plist';  //必须用https协议访问cpw.plist安装清单--->IOS签名的 ,可以搭建一个ftp服务器放在下面,也可以在本服务器上放置.plist文件} else if ( /android/.test(ua)) { // 安卓系统 -> 跳安卓端下载地址console.log("ssss");       window.location.href = 'http://admin.abc.caizhan99.com/caizhan99_android.apk';//alert("android");} else if (IsPC()){ // PC端window.location.href = 'http://admin.abc.caizhan99.com/caizhan99_android.apk';}}function IsPC() {if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {return false;}else {return true;}}</script>
</html>

写IOS 的安装清单文件 cpw.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict><key>items</key><array><dict><key>assets</key><array><dict><key>kind</key><string>software-package</string><key>url</key><string>http://admin.abc.caizhan99.com/caizhan99_ios.ipa</string></dict><dict><key>kind</key><string>full-size-image</string><key>needs-shine</key><true/><key>url</key><string>http://admin.abc.caizhan99.com/logo.png</string></dict><dict><key>kind</key><string>display-image</string><key>needs-shine</key><true/><key>url</key><string>http://admin.abc.caizhan99.com/logo.png</string></dict> </array><key>metadata</key><dict><key>bundle-identifier</key><string>com.app.cpw</string><key>bundle-version</key><string>1.1.0</string><key>kind</key><string>software</string><key>title</key><string>好货</string></dict></dict></array>
</dict>
</plist>

下载安装包放置路径   :   http://admin.abc.caizhan99.com/caizhan99_ios.ipa

IOS 清单文件放置路径:   https://www.xxx.cc/public/cpw.plis

第四   生成访问二维码:

第五  访问测试

1, 用微信打开 ,不要用 Safari浏览器打开:

2, 信任安装:

完工:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

自己服务器上部署APP应用(安卓和IOS版),下载页面的代码,以及IOS的xxx.plist文件的建立相关推荐

  1. 如何在服务器上部署若依开源框架?(Linux版)

    本章教程,主要介绍一下,如何将若依前后端分离项目(RuoYi_Vue)发布到线上(Linux版本),在你阅读之前,希望你自己可以将若依前后端分离项目在本地环境中运行一下,确保项目能在本地环境中顺利运行 ...

  2. flask+uwsgi+supervisor+nginx在局域网服务器上部署实践

    flask可以快速的搭建http服务,但是为了搭建网站还是需要web服务器和相关监控管理操作,一套flask.uwsgi.supervisor.nginx是较好的完整解决方案. 本文对自己学习做一个记 ...

  3. Django项目在Linux服务器上部署和躺过的坑

    引言 在各方的推荐下,领导让我在测试环境部署之前开发的测试数据预报平台.那么问题来了,既然要在服务器上部署, 就需要准备: 1.linux服务器配置 2.linux安装python环境搭建与配置 3. ...

  4. 在 Linux 服务器上部署 oracle10gr2 数据库全过程

    在 Linux 服务器上部署 oracle10gr2 数据库全过程 最近在 Linux 系统上进行 oracle 服务器的部署,对于作者这种 Linux 菜鸟来说着实不容易,很是废了一番功夫.但最后还 ...

  5. linux怎么开启httpd服务公钥,在Apache httpd服务器上部署SSL证书

    Apache是一款时下最主流.被广泛使用的web服务器.本文详细描述如何在Apache httpd服务器上部署并使用SSL(Secure Sockets Layer)证书. 前提条件 Apache 2 ...

  6. 在Postfix邮件服务器上部署SSL证书

    在Postfix邮件服务器上部署SSL证书 # 前提条件 # 如何部署 # 配置文件 # 启动SMTPS服务 # 重启Postfix服务器 # 更多信息 Postfix是一款基于sendmail改良而 ...

  7. 居家办公小妙招、前后端在远程服务器上部署完成后怎么启动?

    一.居家办公小妙招 1.VPN连接后钉钉登不上,怎么办? 1)打开360浏览器,点击下边我框红的打开菜单按钮 2)选择工具->Internet选项,弹出Internet属性,接下来选择连接-&g ...

  8. 在服务器上部署自己的h5页面用于微信内部浏览器打开

    在服务器上部署自己的h5页面用于微信内部浏览器打开  域名注册 和 虚拟主机租用  都是在 西部数据 进行的 以下为 西部数据 的官网 登录和注册这里不过多介绍...... 一.域名注册 点击官网首页 ...

  9. 在云服务器上部署的项目一直运可以怎么做

    之前在阿里云上部署的一个项目,但是每次访问都需要ssh访问远程服务器, 运行项目才能够访问.于是网上查了一些资料, 但是并没有找到我想要的结果,但是最后我还是找到了我想要的答案.是在阿里云的帮助文档上 ...

最新文章

  1. ITK:使用FFT与输入图像的掩码图像进行归一化相关
  2. python回复邮件_在Python中通过Outlook回复电子邮件
  3. 对数线性模型:逻辑斯谛回归和最大熵模型
  4. java get提交中文乱码_java中form以post、get方式提交数据中文乱码问题总结
  5. Java单元测试用例的编写
  6. 说说自己,向前看远些,路还要走下去的
  7. 关于SketchUp 2017版本安装之后一打开就会发送错误报告的问题
  8. Labwindows_cvi基于C语言程控矢量网络分析仪
  9. HashMap和TreeMap排序
  10. python turtle渐变色_Python : turtle色彩控制实例详解
  11. MySQL基本数据类型
  12. 修改并完善框架协议、合同的类型、有效期及目标值等
  13. 防雷知识:什么是雷电浪涌
  14. OC / Swift / Xcode - 怎么私有化init 方法(禁止调用init方法生成对象)
  15. 程序员如何修炼成系统分析员
  16. 根据经纬度坐标值在百度地图上绘制轨迹
  17. PVCBOT【15号A版】机械昆虫--六足爬行机器人
  18. openwrt udp服务器_VOS 安装服务器软硬件配置需求媒体转发
  19. 机器学习基础01-线性代数
  20. 金山云瞄准沉浸式视频云,是远见还是豪赌?

热门文章

  1. IE/Firefox中css兼容常见问题
  2. PIX515防火墙配置策略实例
  3. laravel中Request、Session、Response、Middelware
  4. TikTok Shop新增三大站点,已开放申请
  5. zip压缩和unzip解压缩命令详解
  6. cdn对加速效果明显吗
  7. 使用VS进行远程调试
  8. SpringMvc CharacterEncodingFilter 解析 encoding 参数并初始化参数
  9. the virtual machine is configured for 64-bit guest operating systems
  10. osgi实战学习之路:6. Service-1