Windows environment Nginx configuration HTTPS under Phpstudy

Source: Internet
Author: User

Nginx configuration file content is as follows

#power by www.php.cn

#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 {

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;

#tcp_nodelay on;

Fastcgi_connect_timeout 300;

Fastcgi_send_timeout 300;

Fastcgi_read_timeout 300;

Fastcgi_buffer_size 128k;

Fastcgi_buffers 4 128k;

Fastcgi_busy_buffers_size 256k;

Fastcgi_temp_file_write_size 256k;

gzip on;

Gzip_min_length 1k;

Gzip_buffers 4 32k;

Gzip_http_version 1.1;

Gzip_comp_level 2;

Gzip_types text/plain application/x-javascript text/css application/xml;

Gzip_vary on;

Gzip_disable "MSIE [1-6].";


Server_names_hash_bucket_size 128;

Client_max_body_size 100m;

Client_header_buffer_size 256k;

Large_client_header_buffers 4 256k;

server {

Listen 80;

server_name localhost;

#charset Koi8-r;

#access_log Logs/access.log Main;

Root "d:/www";

Location/{

Index index.html index.htm index.php l.php;

AutoIndex off;

}

Error_page 502 503 504/50x.html;

Location ~ \.php (. *) $ {

#root "D:/www";

Fastcgi_pass 127.0.0.1:9000;

Fastcgi_index index.php;

Fastcgi_split_path_info ^ (? U). +\.php) (/?. +)$;

Fastcgi_param script_filename $document _root$fastcgi_script_name;

Fastcgi_param path_info $fastcgi _path_info;

Fastcgi_param path_translated $document _root$fastcgi_path_info;

Include Fastcgi_params;

}

}

# HTTPS Server

server {

Listen 443;

server_name localhost;


SSL on;

Ssl_certificate D:/PHPSTUDY2018/PHPTUTORIAL/SSL/OPENSSL.CRT;

Ssl_certificate_key D:/phpstudy2018/phptutorial/ssl/openssl.key;

Ssl_session_timeout 5m;

Ssl_protocols SSLv2 SSLv3 TLSv1;

Ssl_ciphers high:!anull:! MD5;

Ssl_prefer_server_ciphers on;

Location/{

root HTML;

Index index.html index.htm;

}

}

Include vhosts.conf;

}


Windows environment Nginx configuration HTTPS under Phpstudy

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.