RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
JAVA开发运维(基于腾讯云的运维资源)-创新互联

序号

东兴网站建设公司创新互联,东兴网站设计制作,有大型网站制作公司丰富经验。已为东兴成百上千家提供企业网站建设服务。企业网站搭建\外贸网站制作要多少钱,请找那个售后服务好的东兴做网站的公司定做!

资源

描述

1

ECS服务器

前端服务器

2

前端服务器

3

前端服务器

4

后端服务器

5

后端服务器

6

后端服务器

7

redis

数据库,缓存

8

mysql

数据库

9

clb

数据库slb,负载均衡

10

OSS

对象存储,存储图片

11

CDN

CDN加速

12

WAF

WAF防护,Web Application Firewall

13

RocketMQ

消息队列

自动化部署使用Jenkins

Web反向代理使用Nginx

采用springCloud的部署架构

配置中心使用Apollo

注册中心使用Eureka

nginx配置:

主配置nginx.conf

user  nginx;
worker_processes  auto;

error_log  /var/log/nginx/error.log notice;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}

http {
    include       /etc/nginx/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  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;
    client_max_body_size 1024m;
    #引入从配置文件
    include /etc/nginx/conf.d/*.conf;

    server_tokens off;
    fastcgi_intercept_errors on;
}

从配置

#常规服务访问server
server {
    listen 8966;
    server_name _;
     
     #代理访h5静态文件
     location  /h5 {
        root  /usr/share/nginx/html/;
        try_files $uri $uri/ /h5/index.html;
    } 
   
   #代理访问后端接口
   location /projectApi/ {
     proxy_set_header Host $host;
     client_max_body_size 10m;
     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:8900/;
   }
 
    
    #代理访问存放图片的目录
    location /icon/ {
        root /usr/share/nginx/html/icon;
        try_files $uri $uri/ /index.html;
    }
         
    #代理错误页面访问
    error_page   403 404  /404.html;
    location = /404.html {
        root  error;
    }

    # redirect server error pages to the static page /50x.html
    # error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   html;
    }

}

#SSl安全访问服务代理 端口 443
server {
    listen 443 ssl;
    #域名
    server_name  maoheyeren.cn;
    #安全证书配置
    ssl_certificate /etc/nginx/cert/ctg.cn2022.txt;
    #安全证书位置
    ssl_certificate_key /etc/nginx/cert/private2022_unsecure.key;
    
    ssl_prefer_server_ciphers on;
    #安全访问协议
    ssl_protocols TLSv1.2;
    location  /h5 {
        root  /usr/share/nginx/html/;
        try_files $uri $uri/ /h5/index.html;
    } 
     
       location /projectApi/ {
         proxy_set_header Host $host;
         client_max_body_size 10m;
         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:8900/;
       }


    location /icon/ {
        root /usr/share/nginx/html/icon;
        try_files $uri $uri/ /index.html;
    }
         
    proxy_intercept_errors on;
    error_page  500 502 503 504 404 403   /404.html;
    #error_page 500 502 503 504 404 403  
    location =  /404.html {
       root   /usr/share/nginx/html;
    }

    # redirect server error pages to the static page /50x.html
    # error_page   500 502 503 504  /50x.html;
    #location = /50x.html {
    #    root   html;
    #}

nginx日志按天分割配置

if ($time_iso8601 ~ "^(d{4})-(d{2})-(d{2})T(d{2}):(d{2}):(d{2})") 
{        
    set $year $1;        
    set $month $2;        
    set $day $3;        
    set $hour $4;
}
access_log /home/docker/apps/nginx/${server_name}_${year}-${month}-${day}_access.log 
main;

配置中心APollo

注册中心Eureka

你是否还在寻找稳定的海外服务器提供商?创新互联www.cdcxhl.cn海外机房具备T级流量清洗系统配攻击溯源,准确流量调度确保服务器高可用性,企业级服务器适合批量采购,新人活动首月15元起,快前往官网查看详情吧


网页题目:JAVA开发运维(基于腾讯云的运维资源)-创新互联
URL链接:http://scyingshan.cn/article/dsscjh.html