Jenkins+Nginx+vue

news/2025/2/14 6:13:40/

安装nodejs

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

@echo off
xcopy C:\ProgramData\Jenkins\.jenkins\workspace\super_manage_vue\dist F:\java\www\super_manage_vue\ /s /e /y
echo 复制文件完成
exit

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

安装niginx
配置文件如下


#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   F:/java/www/super_manage_vue;index  index.html index.htm;}location /prod-api/ {proxy_set_header Host $http_host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header REMOTE-HOST $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_pass http://localhost:6517/;}#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##server {#    listen       443 ssl;#    server_name  localhost;#    ssl_certificate      cert.pem;#    ssl_certificate_key  cert.key;#    ssl_session_cache    shared:SSL:1m;#    ssl_session_timeout  5m;#    ssl_ciphers  HIGH:!aNULL:!MD5;#    ssl_prefer_server_ciphers  on;#    location / {#        root   html;#        index  index.html index.htm;#    }#}}

这样访问vue时,路径匹配prod-api就被Nginx反向代理到http://localhost:6517/;这个端口,这个端口是启动java后的端口。这样就能访问到java的接口。
在这里插入图片描述


http://www.ppmy.cn/news/1014149.html

相关文章

mxgraph的核心元素详谈

前言: MxGraph是一个流行的开源图形库,它提供了一stop solution for creating graphical representations of data。下面是MxGraph的核心源码讲解: 正文: Graph Structure(图结构): MxGraph将一个图表示为一个层次结构,由节点和边组成。节点表示图中的顶点,而边表示它…

docker安装neo4j

参考文章: 1、Mac 本地以 docker 方式配置 neo4j_neo4j mac docker_Abandon_first的博客-CSDN博客 2、https://www.cnblogs.com/caoyusang/p/13610408.html 安装的时候,参考了以上文章。遇到了一些问题,记录下自己的安装过程: …

Linux命令查看文件和文件夹内存空间大小 du -sh

1. du -sh 查看文件,文件夹空间大小 1.1 du: disk usage 1.2 -s:表示以总结(summary)的方式显示结果,只显示总大小 1.3 -h: 表示以人类(human)可读的格式显示结果 2. 查看项目总…

css小练习:案例6.炫彩加载

一.效果浏览图 二.实现思路 html部分 HTML 写了一个加载动画效果&#xff0c;使用了一个包含多个 <span> 元素的 <div> 元素&#xff0c;并为每个 <span> 元素设置了一个自定义属性 --i。 这段代码创建了一个简单的动态加载动画&#xff0c;由20个垂直排列的…

嵌入式面试5 -makefile shell

2、 如果有一个简单的helloworld项目目录如下&#xff1a; tree helloworld helloworld |– file2.h |– file1.cpp |– file2.cpp 请编写一个Makefile文件。 答&#xff1a; TARGET helloworld CXX g COMPILE : $(COMPILE) file1.cpp COMPILE : $(COMPILE) file2.cpp OBJE…

关于时区,时间戳的问题

背景&#xff1a; 1.服务器的时区是0时区 2.客户端是北京时间&#xff0c;传了个当天的时间给服务端计算出当天的时间区间&#xff0c;结果通过new Date等常见操作后&#xff0c;算出来的是0时区的00:00到23:59的时间戳。这个时间戳的起始区间都会比客户端的时间多8个小时。假…

耗时6个月,我做了一款干净、免费、开源的AI数据库

一、Chat2DB简介 在消失的这段时间&#xff0c;我做了一款集成了AI的数据库管理工具Chat2DB。 他是数据库也集成了AIGC的能力&#xff0c;能够将自然语言转换为SQL&#xff0c;也可以将SQL转换为自然语言&#xff0c;还可以给出SQL的优化建议&#xff0c;可以极大提升效率。 …

Win7 专业版Windows time w32time服务电脑重启后老是已停止

环境&#xff1a; Win7 专业版 问题描述&#xff1a; Win7 专业版Windows time w32time服务电脑重启后老是已停止 解决方案&#xff1a; 1.检查启动Remote Procedure Call (RPC)、Remote Procedure Call (RPC) Locator&#xff0c;DCOM Server Process Launcher这三个服务是…