Nginx Configuration Structure

Source: Internet
Author: User

Nginx conf Structure
Nginx used to only flip the configuration file under the virtual-host.d folder. I recently learned about the nginx. conf file because of 400 0. Summary.

Nginx configuration file path:/usr/local/nginx/conf

Nginx. conf in this folder is the public configuration of the server.

Nginx. conf:

1. Configure public services: cache path, server instance, and number of requests.

2. A host: localhost is configured to accept http: // localhost/requests.

3. include virtualhost. d/*. conf

The custom host configuration file is stored in:/usr/local/nginx/conf/virtual-host.d
Virtual-host.d role:
1. configure a default. conf file to accept ip requests as follows: (Be sure to set it to default_server)

Server {listen 443 ssl default_server; listen 80 default_server; server_name _; ssl_certificate/usr/local/nginx/conf/ssl/edward. crt; ssl_certificate_key/usr/local/nginx/conf/ssl/edward. key; access_log off; location/{deny all ;}}

2. Configure your VM as needed.

 

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.