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

dede 网站改宽屏代码便宜的seo官网优化

dede 网站改宽屏代码,便宜的seo官网优化,桂林分销网站开发,wordpress页面居中最近项目中用到关于Nginx前后端分离部署spring boot和vue工程以及反向代理的配置,总结了一下说明: 1、后端是spring boot工程,端口8000,通过 jar命令启动 nohup java -jar xxx-jsonflow-biz.jar > /usr/local/nohup.out 2>…

最近项目中用到关于Nginx前后端分离部署spring boot和vue工程以及反向代理的配置,总结了一下说明:

1、后端是spring boot工程,端口8000,通过 jar命令启动

nohup java -jar xxx-jsonflow-biz.jar > /usr/local/nohup.out 2>&1 &

2、后台前端是vue工程,打包成dist文件夹,端口是13000,nginx配置如下:

    server {listen 13000;server_name localhost;gzip on;gzip_min_length 1k;gzip_comp_level 4;gzip_proxied any;gzip_types text/plain text/xml text/css;gzip_vary on;gzip_disable "MSIE [1-6]\.(?!.*SV1)";root /usr/local/nginx/html/dist;location ~* ^/jsonflow/ {#proxy_pass http://127.0.0.1:8000;proxy_connect_timeout 15s;proxy_send_timeout 15s;proxy_read_timeout 15s;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header X-Forwarded-Proto http;#proxy_method GET POST PUT DELETE;add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Credentials 'true'; add_header Access-Control-Allow-Methods 'GET,PUT,POST,OPTIONS'; add_header Access-Control-Allow-Headers 'user-id,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';if ($request_method = 'OPTIONS') {return 204;}proxy_pass http://127.0.0.1:8000;}if ($request_uri ~ "/actuator"){return 403;}}

3、h5移动端是2个应用,配了2个server,分别对应h5文件夹下的2个目录,nginx配置如下:

    server {listen       9001;server_name  localhost;#charset koi8-r;#access_log  logs/host.access.log  main;error_page 403 =200 /40x.html;location /40x.html {root html;}location / {root   html/h5/yiyuan;index  index.html ;}}server {listen       9002;server_name  localhost;#charset koi8-r;#access_log  logs/host.access.log  main;error_page 403 =200 /40x.html;location /40x.html {root html;}location / {root   html/h5/yaodian;index  index.html ;}}

4、完整的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 {map $http_upgrade $connection_upgrade {default upgrade;''      close;}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;server {listen       9001;server_name  localhost;#charset koi8-r;#access_log  logs/host.access.log  main;error_page 403 =200 /40x.html;location /40x.html {root html;}location / {root   html/h5/yiyuan;index  index.html ;}}server {listen       9002;server_name  localhost;#charset koi8-r;#access_log  logs/host.access.log  main;error_page 403 =200 /40x.html;location /40x.html {root html;}location / {root   html/h5/yaodian;index  index.html ;}}server {listen 13000;server_name localhost;gzip on;gzip_min_length 1k;gzip_comp_level 4;gzip_proxied any;gzip_types text/plain text/xml text/css;gzip_vary on;gzip_disable "MSIE [1-6]\.(?!.*SV1)";root /usr/local/nginx/html/dist;location ~* ^/(jsonflow/ws) {proxy_pass http://127.0.0.1:8000;proxy_http_version 1.1;proxy_set_header Upgrade $http_upgrade;proxy_set_header Connection "upgrade";}location ~* ^/jsonflow/ {#proxy_pass http://127.0.0.1:8000;proxy_connect_timeout 15s;proxy_send_timeout 15s;proxy_read_timeout 15s;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header X-Forwarded-Proto http;#proxy_method GET POST PUT DELETE;add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Credentials 'true'; add_header Access-Control-Allow-Methods 'GET,PUT,POST,OPTIONS'; add_header Access-Control-Allow-Headers 'user-id,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';if ($request_method = 'OPTIONS') {return 204;}proxy_pass http://127.0.0.1:8000;}location ~* ^/(gen) {proxy_pass http://127.0.0.1:5003;proxy_connect_timeout 15s;proxy_send_timeout 15s;proxy_read_timeout 15s;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header X-Forwarded-Proto http;}if ($request_uri ~ "/actuator"){return 403;}}
}

5、nginx目录如下图:

6、番外,关于https证书的配置:

	server {listen 443 ssl;server_name localhost;gzip on;gzip_static on;gzip_min_length 1k;gzip_comp_level 4;gzip_proxied any;gzip_types text/plain text/xml text/css;gzip_vary on;gzip_disable "MSIE [1-6]\.(?!.*SV1)";ssl_protocols GMTLSv1.1;ssl_certificate crt/gm/SS.pem;ssl_certificate_key crt/gm/SS.key.pem;ssl_certificate crt/gm/SE.pem;ssl_certificate_key crt/gm/SE.key.pem;root /usr/local/dist;location ~* ^/(ewaycloud) {proxy_pass http://127.0.0.1:8000;proxy_connect_timeout 60s;proxy_send_timeout 60s;proxy_read_timeout 60s;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header X-Forwarded-Proto http;}}

http://www.15wanjia.com/news/3470.html

相关文章:

  • wordpress做淘客网站建网站一般多少钱
  • 大学生个人网站怎么做百度热搜榜
  • 深圳市建设执业培训中心网站网络营销工作内容
  • 做购物网站用什么应用网络营销服务的内容
  • 网站打开速度慢是什么原因搜索关键词技巧
  • 做网站百度推广多少钱品牌网络推广运营公司
  • 今日重大国际新闻军事广西seo优化
  • 如何迅速建企业网站百度应用中心
  • 网站建设技术包括app开发工具哪个好
  • 金蝶云企业云平台谷歌seo搜索
  • 惠阳住房与规划建设局网站便宜的seo网络营销推广
  • 松江网站建设推广应用商店关键词优化
  • 网站策划搭建方案网站的推广方案的内容有哪些
  • 查域名备案信息百度网站排名优化
  • 开淘宝店和做网站有什么区别昆明装饰企业网络推广
  • 重庆网站建设是什么推广衣服的软文
  • 如何在360网页上做公司网站淄博seo网络公司
  • 广州哪里有做网站有必要买优化大师会员吗
  • 南京手机网站建设烟台百度推广公司
  • nas网站怎么做网站百度竞价多少钱一个点击
  • 青岛的网站设计上海seo网站优化软件
  • 化妆品做网站流程成都百度推广开户公司
  • 烟台做网站多钱有域名有服务器怎么做网站
  • 网站备案取名百度一下百度主页官网
  • 要怎么做自己的网站视频教学好搜搜索引擎
  • 网站开发和合同百度下载安装 官方
  • 开网店的流程视频电商关键词排名优化怎么做?
  • 河南郑州汽车网网站建设自学seo能找到工作吗
  • 网站建设应考虑哪些方面的问题线上营销模式有哪些
  • 恩施网站制作公司中国万网域名注册免费