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

个人网站搭建wordpress广东建设信息网手机版

个人网站搭建wordpress,广东建设信息网手机版,网站建设用什么语言好,加强网站信息内容建设第一步先对整个项目进行通过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/582735.html

相关文章:

  • 临海响应式网站设计重庆seo入门教程
  • wordpress禁止响应重庆网站建设及优化
  • 湘潭知名网站建设河南网站建设企业
  • 建设工程安全监督备案网站静安西安网站建设
  • 运营商做网站网站维护费
  • 商城app开发多少钱一键优化ppt
  • 东莞模板建站软件seo关键词选取工具
  • 深圳平湖网站建设公司天津百度快照优化公司
  • 九江市建设局网站海兴网站建设价格
  • 网站建设虚拟空间苏州网站建设企业网站制作
  • 旅游网站模板html5seo技术专员招聘
  • 建站的流程是什么需要什么步骤如何重新编辑wordpress
  • 鼓楼做网站价格软件工程软件开发
  • 静安建设机械网站网站推广服务网址
  • 做网站有哪些注意事项如何查询网站的空间商
  • 免费动态图片素材网站专业的网站建设平台
  • 网站改版 需求文档门户网站需要多少费用
  • 做原创的网站wordpress升级方法
  • 国外字体设计网站徐州注册公司
  • 网络技术专业学什么合肥seo网站排名
  • 个旧市建设网站网站主页模板
  • 宜兴建设局拍卖房产的网站织梦 网站地图 样式
  • 常德做网站专业公司哪家好怎么创建免费的网站
  • 有了网站开发app是不是更容易网站死链检查
  • 网站域名注册需要什么手续深圳专业seo优化公司
  • 怎做不下网站刷枪wordpress评论不显示头像
  • 德阳响应式网站建设中国建设银行蚌埠官方网站
  • 网站运营小白可以做吗软件推广赚钱一个30
  • 电子商务网站建设需要哪些工作品牌设计公司宣传文案
  • 沅江网站制作餐饮app定制