国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Table of Contents
啟動(dòng)項(xiàng)目
配置Nginx
測試項(xiàng)目
結(jié)語
Home WeChat Applet Mini Program Development Teach you step by step how to deploy WeChat applet and go online

Teach you step by step how to deploy WeChat applet and go online

Dec 03, 2021 am 10:18 AM
WeChat applet

怎么部署微信小程序并上線?下面本篇文章分享一個(gè)部署微信小程序的過程并上線微信小程序,希望對大家有所幫助!

Teach you step by step how to deploy WeChat applet and go online

今天將簡單介紹將項(xiàng)目部署到服務(wù)器中,并將前端代碼提交到微信待審核。下面直接開始正題。?

啟動(dòng)項(xiàng)目

??后端基于SpringBoot的微信小程序服務(wù)的所有接口已經(jīng)開發(fā)完成,那么現(xiàn)在開始將服務(wù)部署到云服務(wù)器中,登錄服務(wù)器。

Teach you step by step how to deploy WeChat applet and go online

使用Maven將項(xiàng)目打包完成,

Teach you step by step how to deploy WeChat applet and go online

將項(xiàng)目的文件打包上傳到服務(wù)器中

Teach you step by step how to deploy WeChat applet and go online

??通過命令 ls 可以看到已經(jīng)將文件上傳到服務(wù)器了。使用命令:java -jar BootWxTool-0.0.1-SNAPSHOT.jar 啟動(dòng)Spring Boot項(xiàng)目。啟動(dòng)過程如下圖。

java -jar BootWxTool-0.0.1-SNAPSHOT.jar

Teach you step by step how to deploy WeChat applet and go online

??項(xiàng)目啟動(dòng)完成之后,無法訪問服務(wù),可能是安全組沒有配置,到服務(wù)器一看,沒有配置安全組,將項(xiàng)目中使用到的端口在服務(wù)器安全組中進(jìn)行配置。

Teach you step by step how to deploy WeChat applet and go online

配置Nginx

將安全組配置之后,還需要配置Nginx進(jìn)行轉(zhuǎn)發(fā),本次使用的端口不是80端口。找到Nginx配置文件所在位置:

/www/server/nginx/conf

通過命令vim nginx.conf查看配置文件的路徑為:因此需要到這個(gè)路徑下對服務(wù)進(jìn)行配置。

include /www/server/panel/vhost/nginx/*.conf;

Teach you step by step how to deploy WeChat applet and go online

進(jìn)入到配置文件所在的文件夾

cd /www/server/panel/vhost/nginx/

新建一個(gè)文件

mkdir wxtool.conf

??輸入如下信息,listen后面是需要監(jiān)聽的端口信息,server_name是需要配置的域名信息。root后面跟著的是項(xiàng)目所在的路徑信息。需要注意的是要加入代理信息。否則可能無法訪問到項(xiàng)目路徑。proxy_***之后的信息就是需要配置的代理信息了。ssl_certificate和ssl_certificate_key是申請的SSL文件的路徑信息。

server
{
    listen 80;
    listen 443 ssl http2;
    server_name weixin.******.com;
    index index.php index.html index.htm default.php default.htm default.html;
    root /java/springboot;
    if ($server_port !~ 443){
        rewrite ^(/.*)$ https://$host$1 permanent;
    }
	
	location / {
    proxy_pass http://127.0.0.1:8080;
    proxy_set_header Host $host:80;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	}
    #HTTP_TO_HTTPS_END
    ssl_certificate    /etc/letsencrypt/live/weixin/6199589_weixin.ruankaoti.com.pem;
    ssl_certificate_key    /etc/letsencrypt/live/weixin/6199589_weixin.ruankaoti.com.key;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
    ssl_prefer_server_ciphers on;
    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout 10m;
    error_page 497  https://$host$request_uri;

    #SSL-END
    
  
    error_page 404 /404.html;
    error_page 502 /502.html;
    #ERROR-PAGE-END
    
    
    #禁止訪問的文件或目錄
    location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)
    {
        return 404;
    }
 
    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
    {
        expires      30d;
        error_log off;
        access_log off;
    }
    
    location ~ .*\.(js|css)?$
    {
        expires      12h;
        error_log off;
        access_log off; 
    }
    access_log  /www/wwwlogs/weixin.*****.com.log;
    error_log  /www/wwwlogs/weixin.*****.com.error.log;
}

當(dāng)配置文件和申請的SSL證書都配置完成之后,在寶塔頁面Nginx管理臺(tái)中點(diǎn)擊重載配置即可。

Teach you step by step how to deploy WeChat applet and go online

測試項(xiàng)目

在瀏覽器中輸入我們配置的域名信息https://weixin.****.com ?可以看到已經(jīng)可以正常訪問網(wǎng)頁了。

Teach you step by step how to deploy WeChat applet and go online

打開微信開發(fā)者工具,將域名信息配置到文件中,進(jìn)行測試可以正常訪問,截圖如下:

Teach you step by step how to deploy WeChat applet and go online

??然后將前端的代碼上傳到測試版本,然后遞交審核之后就可以正常發(fā)布了。整個(gè)審核流程預(yù)計(jì)一天左右。審核完成之后,需要管理人員登錄到微信公眾平臺(tái)得后臺(tái)進(jìn)行上線,上線以后,大家就可以在小程序中訪問項(xiàng)目了。給大家上一張已經(jīng)發(fā)布上線的項(xiàng)目截圖。

Teach you step by step how to deploy WeChat applet and go online

結(jié)語

??好了,以上就是記錄一次部署微信小程序的過程并上線微信小程序,感謝您的閱讀,希望您喜歡,如對您有幫助,歡迎點(diǎn)贊收藏。如有不足之處,歡迎評論指正。下次見。

【相關(guān)學(xué)習(xí)推薦:小程序開發(fā)教程

The above is the detailed content of Teach you step by step how to deploy WeChat applet and go online. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Xianyu WeChat mini program officially launched Xianyu WeChat mini program officially launched Feb 10, 2024 pm 10:39 PM

Xianyu's official WeChat mini program has quietly been launched. In the mini program, you can post private messages to communicate with buyers/sellers, view personal information and orders, search for items, etc. If you are curious about what the Xianyu WeChat mini program is called, take a look now. What is the name of the Xianyu WeChat applet? Answer: Xianyu, idle transactions, second-hand sales, valuations and recycling. 1. In the mini program, you can post idle messages, communicate with buyers/sellers via private messages, view personal information and orders, search for specified items, etc.; 2. On the mini program page, there are homepage, nearby, post idle, messages, and mine. 5 functions; 3. If you want to use it, you must activate WeChat payment before you can purchase it;

Implement image filter effects in WeChat mini programs Implement image filter effects in WeChat mini programs Nov 21, 2023 pm 06:22 PM

Implementing picture filter effects in WeChat mini programs With the popularity of social media applications, people are increasingly fond of applying filter effects to photos to enhance the artistic effect and attractiveness of the photos. Picture filter effects can also be implemented in WeChat mini programs, providing users with more interesting and creative photo editing functions. This article will introduce how to implement image filter effects in WeChat mini programs and provide specific code examples. First, we need to use the canvas component in the WeChat applet to load and edit images. The canvas component can be used on the page

Implement the drop-down menu effect in WeChat applet Implement the drop-down menu effect in WeChat applet Nov 21, 2023 pm 03:03 PM

To implement the drop-down menu effect in WeChat Mini Programs, specific code examples are required. With the popularity of mobile Internet, WeChat Mini Programs have become an important part of Internet development, and more and more people have begun to pay attention to and use WeChat Mini Programs. The development of WeChat mini programs is simpler and faster than traditional APP development, but it also requires mastering certain development skills. In the development of WeChat mini programs, drop-down menus are a common UI component, achieving a better user experience. This article will introduce in detail how to implement the drop-down menu effect in the WeChat applet and provide practical

What is the name of Xianyu WeChat applet? What is the name of Xianyu WeChat applet? Feb 27, 2024 pm 01:11 PM

The official WeChat mini program of Xianyu has been quietly launched. It provides users with a convenient platform that allows you to easily publish and trade idle items. In the mini program, you can communicate with buyers or sellers via private messages, view personal information and orders, and search for the items you want. So what exactly is Xianyu called in the WeChat mini program? This tutorial guide will introduce it to you in detail. Users who want to know, please follow this article and continue reading! What is the name of the Xianyu WeChat applet? Answer: Xianyu, idle transactions, second-hand sales, valuations and recycling. 1. In the mini program, you can post idle messages, communicate with buyers/sellers via private messages, view personal information and orders, search for specified items, etc.; 2. On the mini program page, there are homepage, nearby, post idle, messages, and mine. 5 functions; 3.

WeChat applet implements image upload function WeChat applet implements image upload function Nov 21, 2023 am 09:08 AM

WeChat applet implements picture upload function With the development of mobile Internet, WeChat applet has become an indispensable part of people's lives. WeChat mini programs not only provide a wealth of application scenarios, but also support developer-defined functions, including image upload functions. This article will introduce how to implement the image upload function in the WeChat applet and provide specific code examples. 1. Preparatory work Before starting to write code, we need to download and install the WeChat developer tools and register as a WeChat developer. At the same time, you also need to understand WeChat

Use WeChat applet to achieve carousel switching effect Use WeChat applet to achieve carousel switching effect Nov 21, 2023 pm 05:59 PM

Use the WeChat applet to achieve the carousel switching effect. The WeChat applet is a lightweight application that is simple and efficient to develop and use. In WeChat mini programs, it is a common requirement to achieve carousel switching effects. This article will introduce how to use the WeChat applet to achieve the carousel switching effect, and give specific code examples. First, add a carousel component to the page file of the WeChat applet. For example, you can use the <swiper> tag to achieve the switching effect of the carousel. In this component, you can pass b

Implement image rotation effect in WeChat applet Implement image rotation effect in WeChat applet Nov 21, 2023 am 08:26 AM

To implement the picture rotation effect in WeChat Mini Program, specific code examples are required. WeChat Mini Program is a lightweight application that provides users with rich functions and a good user experience. In mini programs, developers can use various components and APIs to achieve various effects. Among them, the picture rotation effect is a common animation effect that can add interest and visual effects to the mini program. To achieve image rotation effects in WeChat mini programs, you need to use the animation API provided by the mini program. The following is a specific code example that shows how to

Implement the sliding delete function in WeChat mini program Implement the sliding delete function in WeChat mini program Nov 21, 2023 pm 06:22 PM

Implementing the sliding delete function in WeChat mini programs requires specific code examples. With the popularity of WeChat mini programs, developers often encounter problems in implementing some common functions during the development process. Among them, the sliding delete function is a common and commonly used functional requirement. This article will introduce in detail how to implement the sliding delete function in the WeChat applet and give specific code examples. 1. Requirements analysis In the WeChat mini program, the implementation of the sliding deletion function involves the following points: List display: To display a list that can be slid and deleted, each list item needs to include

See all articles