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

柳州建站深圳网站定制深圳网站建设公司

柳州建站,深圳网站定制深圳网站建设公司,wordpress熊掌号提交,ui设计师需要掌握的技能第一步先对整个项目进行通过maven进行clean在进行compile 第二步直接进行打包package和install都可以 第三部把对应的jar放到服务器上 把jar包放到服务器上某个地址下,然后cd到这个目录下,然后执行命令 nohup java -jar ruoyi-admin.jar > springbo…

第一步先对整个项目进行通过maven进行clean在进行compile

第二步直接进行打包package和install都可以

第三部把对应的jar放到服务器上

把jar包放到服务器上某个地址下,然后cd到这个目录下,然后执行命令

nohup java -jar ruoyi-admin.jar > springboot.log 2>&1 &

ps -ef|grep java 可以查看某个进程

第四步打包前端代码

npm run build:prod

打包成功会生成dis

解压放到linux某个目录下/usr/vue

然后进行解压

unzip dist.zip

第五步配置nginx

cd   /usr/local/nginx/conf

找到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   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   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;#    }#}}

直接扔掉

#根据你服务器的cpu核数来确定此值
#user root;
worker_processes  2;#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;#pid        logs/nginx.pid;#events事件主要用来确定Nginx使用哪种算法
events {worker_connections  2048;
}http {#隐藏Nginx版本信息server_tokens off;include mime.types;default_type application/octet-stream;sendfile on;keepalive_timeout 65;#代理的相关参数设置 fastcgi_connect_timeout 300;fastcgi_send_timeout 300;fastcgi_read_timeout 300;fastcgi_buffer_size 128k;fastcgi_buffers 4 128k;fastcgi_busy_buffers_size 256k;fastcgi_temp_file_write_size 256k;#启用gzip压缩,提高用户访问速度# gzip configgzip on;gzip_min_length 1k;gzip_comp_level 9;gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;gzip_vary on;gzip_disable "MSIE [1-6]\.";server_names_hash_bucket_size 128;client_max_body_size 100m; client_header_buffer_size 256k;large_client_header_buffers 4 256k;#自定义变量 $connection_upgrademap $http_upgrade $connection_upgrade { default          keep-alive;  #默认为keep-alive 可以支持 一般http请求'websocket'      upgrade;     #如果为websocket 则为 upgrade 可升级的。}#增加虚拟主机include /usr/local/nginx/conf/admin/*.conf;
}

最后一行代码:一定要看这种情况是配置很多的conf然后统一进行转发

# admin
server{listen 80;server_name localhost;location / {root   /usr/vue/dist;try_files $uri $uri/ /index.html;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://127.0.0.1:8080/;proxy_http_version 1.1;proxy_read_timeout 3600s;proxy_set_header Upgrade $http_upgrade; #此处配置 上面定义的变量proxy_set_header Connection $connection_upgrade;}error_page   500 502 503 504  /50x.html;location = /50x.html {root   html;}
}

root  这个是前端刚刚的dist地址

prod-api 这个是前端请求带的前缀

proxy_pass http://127.0.0.1:8080/; 后端地址

配置好了之后重启nginx就可以了

cd /usr/local/nginx/sbin

里面有一个nginx

./nginx -s reload

一定要注册关闭80防火墙,开发80端口,nginx里面的配置是80

ok了

http://www.dtcms.com/wzjs/819353.html

相关文章:

  • 泰州网站建设定制烟台建设公司网站
  • 太原网站建设维护株洲今天最新通知
  • 网站续费怎么做凡客登录入口
  • 石家庄网站建设优化自己做外贸开通什么网站
  • 网站系统建设合同范本设计坞网站怎么样
  • 网站客户体验为什么wordpress升级
  • 下载类网站如何做wordpress有访客记录
  • 做哪种网站赚钱wordpress 思维导图
  • 网站管理助手4.0教程大型网站服务器配置
  • 点击到达网站指定位置怎么做wordpress 釆集插件
  • 济南360做网站电话运城建设银行网站点
  • 网站后台如何做网站维护常见问题
  • 建设招标网 官方网站优化关键词的步骤
  • 易语言可以做网站么京东网站建设的主旨
  • 做百度手机网站快wordpress页面添加
  • 国外对于网站开发网站设计与制作软件
  • 网站热度查询高校建设思政教育网站案例
  • 网站建设的seo策略世界建筑设计公司排名
  • 做购物商城网站设计PR做视频需要放网站上
  • 郑州地方网络推广网站王也天个人资料
  • 国外网页素材网站襄阳做网站价格
  • 城乡与建设部网站长沙好的网站建设公司排名
  • 深圳哪个网站发布做网站做网站 计算机有交嘛
  • 怎么做网站自动采集数据辽宁建设信息网站
  • 北京做企业网站网站推广效果不好原因是
  • 学术会议网站怎么做长春电商网站建设
  • 校园网站建设特色网页游戏传奇开服表
  • 求个网站直接能看的php做网站需要什么
  • 企业网站类型网站建设佰首选金手指四
  • 网站建设ppt介绍成都网站开发建