亚洲色偷偷一区二区手机在线_国产一卡2卡3卡4卡有限公司_日产精品一至六区_国产成人不卡无码免费视频

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:9:00-21:00
當(dāng)您遇到問題
關(guān)閉右側(cè)工具欄
nginx配置443端口
    發(fā)布時(shí)間:2023-05-20   訪問量:15109


server {        listen 80;        server_name abc.com;        return 301 https://$host$request_uri;            #可用301跳轉(zhuǎn)(選其一)        rewrite ^(.*)$  https://abc.com$1 permanent; #也可用地址重寫規(guī)則(選其一)}

server {    listen 443 ssl;    server_name  abc.com;    ssl_certificate     /etc/nginx/ssl/abc.crt;    ssl_certificate_key /etc/nginx/ssl/abc.key;    ssl_session_timeout 5m;    ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;    ssl_ciphers   ALL:!DH:!EXPORT:!RC4:+HIGH:+MEDIUM:-LOW:!aNULL:!eNULL;    ssl_prefer_server_ciphers  on;    add_header Access-Control-Allow-Origin *;    add_header Access-Control-Allow-Headers X-Requested-Wit,content-typeh;    add_header Access-Control-Allow-Methods GET,POST,OPTIONS;    location / {    root  /home/abc;    }     access_log  off;}

配置可用于 php 環(huán)境,同時(shí)實(shí)現(xiàn)443端口的跳轉(zhuǎn)

server {        listen 80;        server_name abc.com;        return 301 https://$host$request_uri;            #可用301跳轉(zhuǎn)(選其一)        rewrite ^(.*)$  https://abc.com$1 permanent; #也可用地址重寫規(guī)則(選其一)}server {    listen 443 ssl;    server_name abc.com;    ssl_certificate     /etc/nginx/ssl/abc.crt;    ssl_certificate_key /etc/nginx/ssl/abc.key;    root /usr/share/nginx/abc.com/;    index index.php  index.html index.htm;location ~ .php($|/) {        fastcgi_pass  127.0.0.1:9000;        fastcgi_read_timeout 300;        fastcgi_index index.php;        fastcgi_split_path_info ^(.+.php)(.*)$;        fastcgi_param  PATH_INFO $fastcgi_path_info;        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;        fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;        include         fastcgi_params;        add_header Access-Control-Allow-Origin *;        add_header Access-Control-Allow-Headers X-Requested-Wit,content-typeh;        add_header Access-Control-Allow-Methods GET,POST,OPTIONS;        }        location / {        try_files $uri $uri/ /index.php$is_args$query_string;                if (!-e $request_filename) {                    rewrite ^(.*)$ /index.php?s=$1 last;                    break;                }        }        access_log off;}


上一篇:云服務(wù)器安全防護(hù)技巧

下一篇:沒有了!