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

小程序排名优化seo长沙

小程序排名优化,seo长沙,有专门教做蛋糕的网站,怎么建立一个网站推广Nginx代理前端页面、后端接口 一、前端打包二、后端打包三、Linux部署Nginx启动、暂停、重启服务器部署文件地址: 一、前端打包 npm run build二、后端打包 通过Maven 使用package打包 三、Linux部署 安装Nginx 安装环境 yum -y install gcc pcre pcre-devel z…

Nginx代理前端页面、后端接口

  • 一、前端打包
  • 二、后端打包
  • 三、Linux部署
  • Nginx启动、暂停、重启
  • 服务器部署文件地址:

一、前端打包

在这里插入图片描述

npm run build

二、后端打包

通过Maven 使用package打包
在这里插入图片描述

三、Linux部署

  1. 安装Nginx
    安装环境
yum -y install gcc pcre pcre-devel zlib zlib-devel openssl openssl-devel

安装wgte

yum install wget

下载nginx

wget https://nginx.org/download/nginx-1.21.6.tar.gz

解压压缩文件

tar -zxvf nginx-1.21.6.tar.gz

进入nginx文件夹

cd nginx-1.21.6

配置

./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module

编译和安装

编译:make
安装:make install

Nginx启动、暂停、重启

启动
/usr/local/nginx/sbin/nginx
重启
/usr/local/nginx/sbin/nginx -s reload
如果更改了配置文件建议使用这个方式重新启动
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
停止服务
/usr/local/nginx/sbin/nginx -s stop

  1. 安装java环境(用于启动jar)
    安装地址:https://blog.csdn.net/A_yonga/article/details/125526307
    启动jar:
nohup java -jar -Dspring.profiles.active=prod wx-api.jar &

停止:

kill -9 进程号
  1. 配置Nginx
    nginx.conf:

#user  nobody;
worker_processes  1;#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;#pid        logs/nginx.pid;events {worker_connections  1024;
}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  logs/access.log  main;sendfile        on;#tcp_nopush     on;#keepalive_timeout  0;keepalive_timeout  65;#gzip  on;server {listen       80;server_name  localhost;#charset koi8-r;#access_log  logs/host.access.log  main;location / {root   /data/wx/dist;  // 前端文件地址index  index.html index.htm;}location /wx {proxy_pass http://127.0.0.1:8080/wx;// 后端接口地址及端口}#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   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;#}}# another virtual host using mix of IP-, name-, and port-based configuration##server {#    listen       8000;#    listen       somename:8080;#    server_name  somename  alias  another.alias;#    location / {#        root   html;#        index  index.html index.htm;#    }#}# HTTPS server  如不需要https 则全用#注释#server {listen       443 ssl;server_name  localhost;ssl_certificate      /application/nginx-wx/ssl/cacert.pem;ssl_certificate_key  /application/nginx-wx/ssl/privkey.pem;ssl_session_cache    shared:SSL:1m;ssl_session_timeout  5m;ssl_ciphers  HIGH:!aNULL:!MD5;ssl_prefer_server_ciphers  on;location / {root   /data/wx/dist; index  index.html index.htm;}location /wx {proxy_pass http://127.0.0.1:8080/wx;}}}
  1. 需要开启Https生成ssl临时证书
    https://blog.csdn.net/who7708/article/details/104565369

服务器部署文件地址:

前台文件:/data/wx/dist
后台文件:/data/wx/wx-api.jar
nginx文件:/usr/local/nginx/

http://www.khdw.cn/news/66698.html

相关文章:

  • 营销型网站建设设计6seo排名赚app下载
  • 网站建设OA系统开发四川专业网络推广
  • 网站建设的技术难点今日小说搜索风云榜
  • 自己做网站买怎么才能建立一个网站卖东西
  • wordpress淘宝文军seo
  • 谷歌seo网站建设餐饮营销策划与运营
  • 萧山网站建设百度云网盘登录入口
  • 房地产网站怎么做nba最新交易汇总实时更新
  • 专业制作网站哪家好关键词排名优化怎么做
  • 做网站商城互联网公司郑州专业seo哪家好
  • 男人和女人做哪个网站网站建设的公司
  • html做分页的网站百度推广投诉电话
  • 南通公司网站制作企业seo顾问
  • 电脑做网站主机全球疫情最新消息
  • 自己做网站服务器seo如何优化的
  • 什么是h5动态网站建设网络营销推广有哪些方法
  • 学前教育网站建设百度贴吧怎么做推广
  • 专业云南做网站想做游戏推广怎么找游戏公司
  • sql2008做查询网站百度卖货平台
  • 手机网站建设服务网络推广营销方式
  • 做最好的色书网站网络公关公司联系方式
  • 营销网站的优势是什么意思网站关键词怎么优化排名
  • 网络安全薪水一般多少seo软件哪个好
  • 石家庄网站开发公司网站关键词优化报价
  • wordpress 顶部自定义安卓优化大师
  • 老师让做网站怎么做郑州网站建设最便宜
  • 网站开发eq编辑器百度一下搜索一下
  • 福州最好的网站建设网络公司做网络推广一个月的收入
  • 门户网站建设主要内容新闻发布最新新闻
  • 做么网站有黄网游推广