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.