text mysite.ru.vhost

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text mysite.ru.vhost相关的知识,希望对你有一定的参考价值。

# Image resize with nginx (this is replace phpThumb script)
js_include mysite.js;
js_set $js_get_uri_src_dirname js_get_uri_src_dirname;
js_set $js_get_image_uri js_get_image_uri;
js_set $js_get_image_filename js_get_image_filename;
js_set $js_get_resized_image_filename js_get_resized_image_filename;

server {
        set $dm         mysite.ru;
        set $cs         utf-8;
        set $docroot    /var/www/mysite.ru/web;

        listen XX.XX.XX.XX:80;
        listen XX.XX.XX.XX:443 http2 ssl;
        server_name www.mysite.ru;

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_certificate /etc/letsencrypt/live/mysite.ru/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/mysite.ru/privkey.pem;
        ssl_session_cache shared:MYSITESSL:10m;
        ssl_session_timeout 5m;
        ssl_dhparam /etc/nginx/ssl/dhparams.pem;
        ssl_prefer_server_ciphers on;
        ssl_session_tickets off;
        ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";

        resolver 8.8.8.8 8.8.4.4 valid=300s;
        resolver_timeout 5s;
        ssl_stapling on;
        ssl_stapling_verify on;
        ssl_trusted_certificate /etc/nginx/ssl/letsencrypt-ca.pem;
        ssl_stapling_responder http://ocsp.int-x3.letsencrypt.org;
        
        return 301 $scheme://$dm$request_uri;
}

server {
        set $dm         mysite.ru;
        set $cs         utf-8;
        set $docroot    /var/www/mysite.ru/web;
        set $fastcgipass unix:/var/lib/php5-fpm/xxx.sock;
        # Image resize with nginx (this is replace phpThumb script)
        set $image_resize_dir /var/www/mysite.ru/private/image_resize;

        listen XX.XX.XX.XX:80;
        listen XX.XX.XX.XX:443 http2 ssl;
        server_name mysite.ru;
        root $docroot;

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_certificate /etc/letsencrypt/live/mysite.ru/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/mysite.ru/privkey.pem;
        ssl_session_cache shared:MYSITESSL:10m;
        ssl_session_timeout 5m;
        ssl_dhparam /etc/nginx/ssl/dhparams.pem;
        ssl_prefer_server_ciphers on;
        ssl_session_tickets off;
        ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";

        resolver 8.8.8.8 8.8.4.4 valid=300s;
        resolver_timeout 5s;
        ssl_stapling on;
        ssl_stapling_verify on;
        ssl_trusted_certificate /etc/nginx/ssl/letsencrypt-ca.pem;
        ssl_stapling_responder http://ocsp.int-x3.letsencrypt.org;

        index index.php index.html index.htm;

        error_log /var/www/mysite.ru/log/error.log;
        access_log /var/www/mysite.ru/log/access.log main flush=1m buffer=256k;

        ## Disable .htaccess and other hidden files
        location ~* /\.(ht|svn|hg) {
                deny all;
                access_log off;
                log_not_found off;
        }

        ## Disable .gitignore file and .git directory
        location ~ (/\.gitignore|/\.git) {
                deny all;
                access_log off;
                log_not_found off;
        }
        
        # Image resize with nginx (this is replace phpThumb script)
        location ^~ /phpThumb/ {
                alias $image_resize_dir$js_get_uri_src_dirname;
                access_log on;
                set $image_filename $image_resize_dir$js_get_image_filename;
                if (!-f $image_filename) {
                        proxy_pass http://127.0.0.1:81/$js_get_image_uri;
                        break;
                }
                if (-f $image_filename) {
                        proxy_pass http://127.0.0.1:81/$js_get_resized_image_filename;
                        break;
                }
                proxy_store             $image_filename;
                proxy_temp_path         /tmp;
                proxy_store_access      user:rw group:rw all:r;
                expires                 168h;
        }

        location ~* ^.+\.(jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|exe|xls|doc|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|mov)$ {
                expires $expires_image_and_media;
                access_log off;
                log_not_found off;
        }

        location ~* ^.+\.(css|js)$ {
                expires $expires_css_js;
        }

        location = /favicon.ico {
                log_not_found off;
                access_log off;
        }

        location = /robots.txt {
                allow all;
                log_not_found off;
                access_log off;
        }

        location ~* /(netcat_dump|netcat_files)/.*\.php$ {
                deny all;
                access_log off;
                log_not_found off;
        }

        location ~ ^/(netcat_cache|netcat_trash)/ {
                deny all;
                access_log off;
                log_not_found off;
        }

        location ~* ru_cp1251.js$ {
                charset cp1251;
                break;
        }

        location /netcat/FCKeditor {
                client_body_buffer_size 128k;
                charset utf-8;
                index index.php;
        }

        location /netcat/editors/FCKeditor {
                client_body_buffer_size 128k;
                charset utf-8;
                index index.php;
        }

        location /netcat/editors/ckeditor {
                client_body_buffer_size 128k;
                charset utf-8;
                index index.php;
        }

        location /netcat/editors/ckeditor4 {
                client_body_buffer_size 128k;
                charset utf-8;
                index index.php;
        }

        error_page 404 = @cms;

        location / {
                limit_req       zone=req_limit_per_ip burst=40 nodelay;
                charset         $cs;
                try_files       $uri $uri/ @cms;
                index           index.php index.html index.htm;
        }

        location ~ \.php$ {
                limit_req       zone=req_limit_per_ip burst=50 nodelay;
                try_files       $uri @cms;
                charset         $cs;
                include         /etc/nginx/fastcgi_params;
                fastcgi_param   HTTPS $fastcgi_https;
                fastcgi_pass    $fastcgipass;
                fastcgi_index   index.php;
                fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
        }

        location @cms {
                limit_req       zone=req_limit_per_ip burst=40 nodelay;
                charset         $cs;
                include         /etc/nginx/fastcgi_params;
                fastcgi_pass    $fastcgipass;
                fastcgi_param   HTTPS $fastcgi_https;
                fastcgi_index   index.php;
                fastcgi_param   SCRIPT_FILENAME $document_root/netcat/require/e404.php;
                fastcgi_param   SCRIPT_NAME /netcat/require/e404.php;
                fastcgi_param   QUERY_STRING REQUEST_URI=$uri&$args;
        }

}

# Image resize with nginx (this is replace phpThumb script)
server {
        listen 127.0.0.1:81;
        access_log off;
        location / {
                set $img_path $arg_path;
                alias /var/www/mysite.ru/private/image_resize/$img_path;
        }
        location /image_resize {
                set $img_width $arg_width;
                set $img_height $arg_height;
                set $img_quality $arg_quality;
                set $img_path $arg_path;
                alias /var/www/mysite.ru/web$img_path;
                image_filter resize $img_width $img_height;
                image_filter_jpeg_quality $img_quality;
                image_filter_buffer 4M;
        }
}

以上是关于text mysite.ru.vhost的主要内容,如果未能解决你的问题,请参考以下文章

<!-- text --> 和 /* text */ 注释有啥区别?

VB中 如何复制Text1.text的字体到剪贴板? 如何剪切?

VB 加减乘除

text-decoration:[ text-decoration-line ] || [ text-decoration-style ] || [ text-decoration-color ]

.text 和 .get_text() 之间的区别

javascript或css:如何隐藏标签内的文本中的任何数字,后跟点前缀“1.text”,“2.text”...“30.text”