Nginx Configuration Miscellaneous

Source: Internet
Author: User

1, an interface form requirements are: ip+ port, and the type of communication protocol is: HTTPS, how to do domain name resolution:

① set a port. Also open this port in the firewall, restart the firewall;


② on the server/ETC/NGINX/CONF.D directory, add an nginx configuration file, equivalent to add a site service, but this site does not use the domain name but the IP address plus port;
Upload this file configuration file to the server and restart Nginx.

Attached: Configuration file Contents demo.notify.ssl.conf

Server {Listen8001; server_name -. xxx.xxx.xxx;        SSL on; Ssl_certificate/data/ssl/Www.xxx.pem; Ssl_certificate_key/data/ssl/Www.xxx.key;        Ssl_session_timeout 5m; Ssl_protocols TLSv1 TLSv1.1TLSv1.2; Ssl_ciphers ECDHE-rsa-aes128-gcm-sha256:high:!anull:! md5:! rc4:!DHE;        Ssl_prefer_server_ciphers on; Location/{root/data/www/xxx;            #index index.html index.htm index.php;        Index xxxxxx__notify.php; if(!-e $request _filename) {#rewrite^ (. *) $/index.php?s=$1Last ; Rewrite^/(. *) $/index.php/$1Last ;  Break; }} Location~\.php {root/data/www/xxx; Fastcgi_pass127.0.0.1:9000;        Fastcgi_index index.php;        Include fastcgi.conf; Set$real _script_name $fastcgi _script_name; if($fastcgi _script_name ~"^ (. +?\.php) (/.+) $") {            Set$real _script_name $1; Set$path _info $2;        } fastcgi_param script_filename $document _root$real_script_name;        Fastcgi_param script_name $real _script_name;        Fastcgi_param path_info $path _info; }}

Nginx Configuration Miscellaneous

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.