找回密码
 开放注册

QQ登录

只需一步,快速开始

微信登录

微信扫码,快速开始

通达OA官网网站
搜索
查看: 2651|回复: 1

资讯下2017版的如何绑定多个域名

[复制链接]

11

主题

24

回帖

169

牛毛

游客

积分
204
发表于 2017-10-13 10:45:50 | 显示全部楼层 |阅读模式
以下是nginx配置文件,以前也一直是在这里面添加东西的,升级到2017以后发现不行了。。。
#user  nobody;
worker_processes  1;
worker_rlimit_nofile 10240;

#error_log  ../logs/nginx_error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;

events {
    worker_connections  10240;
#    accept_mutex off;
}


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  on;
    server_tokens off;
    sendfile        on;
    #tcp_nopush     on;
    tcp_nodelay     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;
    keepalive_requests 100;

    client_max_body_size 2000m;
    client_header_buffer_size 128k;
    client_body_buffer_size 256k;
    fastcgi_buffer_size 64k;
    fastcgi_buffers 32 64k;
    fastcgi_busy_buffers_size 128k;
    fastcgi_temp_file_write_size 512k;
    fastcgi_connect_timeout 60s;
    fastcgi_read_timeout 1800s;
    fastcgi_send_timeout 1800s;
    fastcgi_intercept_errors off;

    #open_file_cache max=10000 inactive=3600s;
    #open_file_cache_valid 300s;
    #open_file_cache_min_uses 1;
    #open_file_cache_errors on;

    gzip  on;
    gzip_comp_level 9;
    gzip_min_length  1k;
    gzip_buffers     4 16k;
    gzip_http_version 1.0;
    gzip_types       text/plain application/json application/x-javascript application/javascript text/css text/xml image/jpeg image/png image/gif;
    gzip_vary         on;
    gzip_static       on;
    gzip_proxied      any;
    gzip_disable      "MSIE [1-6]\.";

    upstream OfficeFPM{
        server 127.0.0.1:8266 weight=1;

        keepalive 100;
    }

    # HTTP server




    server {
        #Nginx Port
        listen   80;
        server_name   oa.xxx.com;
        root   D:/MYOA/webroot/;
        index  index.php index.html index.htm;

        if (-d $request_filename){
            rewrite ^/(.*)([^/])$ $scheme://$http_host/$1$2/ permanent;
        }

        #charset gbk;
        access_log  logs/oa.access.log  main;
        error_log   logs/oa.error.log;

        location ~* ^/(attachment|static|images|theme|templates|wav)/.*\.(php|.php3|.php5|jsp|asp)$ {
            deny all;
        }

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:8266
        #
        location ~ \.php$ {
            fastcgi_pass   OfficeFPM;
            fastcgi_index  index.php;
            include        fastcgi.conf;
        }

        location /general/document/index.php/ {
            fastcgi_pass  OfficeFPM;
            fastcgi_index  index.php;
            include        fastcgi.conf;

            fastcgi_param  SCRIPT_FILENAME   D:/MYOA/webroot/general/document/index.php;
            fastcgi_param  SCRIPT_NAME       /general/document/index.php;
            fastcgi_split_path_info          ^(.+\.php)/(.*)$;
            fastcgi_param  PATH_INFO         $fastcgi_path_info;
            fastcgi_param PATH_TRANSLATED    $document_root$fastcgi_path_info;
        }

        location /general/itask/router.php/ {
            fastcgi_pass   OfficeFPM;
            fastcgi_index  index.php;
            include        fastcgi.conf;

            fastcgi_param  SCRIPT_FILENAME   D:/MYOA/webroot/general/itask/router.php;
            fastcgi_param  SCRIPT_NAME       /general/itask/router.php;
        }
               
        location /general/appbuilder/ {
            index  index.php index.html index.htm;
            try_files $uri $uri/ @rewrite;
            rewrite ^/general/appbuilder/(.*)$ /general/appbuilder/web/index.php?$args;
        }

        location ~* \.(eot|otf|ttf|woff|woff2)$ {
            add_header Access-Control-Allow-Origin *;
        }

        include   common.conf;

        location ~* ^/attachment/(background|im|new_sms|reportshop|cache|data_center|appbuilder) {
            allow all;
        }

        location /attachment {
            deny all;
        }

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}

        rewrite  ^/restapi/ /restapi/public/app.php;
        rewrite  ^/oauth2/ /restapi/public/app.php;

        location ~ ^/tdngstat/ {
            stub_status on;
            access_log off;
        }
    }

    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    # Redirect server
    #server {
    #         #Redirect Port
    #    listen       80;
    #    server_name  localhost;
    #   
    #    if ($request_method != POST){
    #        return       301 https://$server_name$request_uri;
    #    }
    #   
    #    return       307 https://$server_name$request_uri;
    #}


    # HTTPS server

    server {
        #Https Port
        listen   443;
        server_name   oa.xxxcom;
        root   D:/MYOA/webroot/;
        index  index.php index.html index.htm;
        access_log  logs/oa_ssl.access.log  main;
        error_log   logs/oa_ssl.error.log;

        ssl                  on;
        ssl_certificate      server.crt;
        ssl_certificate_key  server.key;

        ssl_session_timeout  5m;

        ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers  ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
        ssl_prefer_server_ciphers   on;

        if (-d $request_filename){
            rewrite ^/(.*)([^/])$ $scheme://$http_host/$1$2/ permanent;
        }

        location ~* ^/(attachment|static|images|theme|templates|wav)/.*\.(php|.php3|.php5|jsp|asp)$ {
            deny all;
        }

        location ~ \.php$ {
            fastcgi_pass   OfficeFPM;
            fastcgi_index  index.php;
            include        fastcgi.conf;
        }

        location /general/document/index.php/ {
            fastcgi_pass  OfficeFPM;
            fastcgi_index  index.php;
            include        fastcgi.conf;

            fastcgi_param  SCRIPT_FILENAME   D:/MYOA/webroot/general/document/index.php;
            fastcgi_param  SCRIPT_NAME       /general/document/index.php;
            fastcgi_split_path_info          ^(.+\.php)/(.*)$;
            fastcgi_param  PATH_INFO         $fastcgi_path_info;
            fastcgi_param PATH_TRANSLATED    $document_root$fastcgi_path_info;
        }
               
        location /general/appbuilder/ {
            index  index.php index.html index.htm;
            try_files $uri $uri/ @rewrite;
            rewrite ^/general/appbuilder/(.*)$ /general/appbuilder/web/index.php?$args;
        }

        location /general/itask/router.php/ {
            fastcgi_pass   OfficeFPM;
            fastcgi_index  index.php;
            include        fastcgi.conf;

            fastcgi_param  SCRIPT_FILENAME   D:/MYOA/webroot/general/itask/router.php;
            fastcgi_param  SCRIPT_NAME       /general/itask/router.php;
        }

        include   common.conf;

        location ~* ^/attachment/(background|im|new_sms|reportshop|cache|data_center|appbuilder) {
            allow all;
        }

        location /attachment {
            deny all;
        }

        rewrite  ^/restapi/ /restapi/public/app.php;
        rewrite  ^/oauth2/ /restapi/public/app.php;
    }

    #Queue OfficeFPM
    upstream OfficeFPMQueue{
        server 127.0.0.1:8250 weight=1;
        keepalive 100;
    }

    # Queue HTTP server
    server {
        #Queue Port
        listen   8750;
        server_name  localhost;
        root   D:/MYOA/webroot/;
        index  index.php;

        if (-d $request_filename){
            rewrite ^/(.*)([^/])$ $scheme://$http_host/$1$2/ permanent;
        }

        #charset gbk;
        access_log  logs/oa_queue.access.log  main;
        error_log   logs/oa_queue.error.log;

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:8250
        #
        location ~ \.php$ {
            fastcgi_pass   OfficeFPMQueue;
            fastcgi_index  index.php;
            include        fastcgi.conf;
        }

        location / {
            allow 127.0.0.1;
            deny  all;
        }

        location ~ ^/tdngstatqueue/ {
            stub_status on;
            access_log off;
        }
    }
}


15

主题

2896

回帖

4224

牛毛

游客

积分
7084
发表于 2017-10-13 16:56:00 | 显示全部楼层
您好,2017版配置ssl协议,直接在“北方通达应用服务控制中心”--通达服务智能配置进行导入证书和秘钥。如图
ssl.png
您需要登录后才可以回帖 登录 | 开放注册

本版积分规则

咨询电话:400 818 0505 通达OA,国内协同管理软件行业内唯一的央企单位,中国协同OA软件的领跑者,优秀协同办公解决方案供应商

帮助|Archiver|小黑屋|通信管理局专项备案号:[2008]238号|由NB5牛论坛提供技术支持NB5社区 ( 皖ICP备08004151号;皖公网安备34010402700514号 )

GMT+8, 2025-4-26 15:03 , Processed in 0.190045 second(s), 45 queries .

Powered by Discuz

Copyright © 2001-2025, 北京通达信科科技有限公司.

快速回复 返回顶部 返回列表