Nginx: Difference between revisions

Jump to navigation Jump to search
190 bytes added ,  23 February 2022
m
server_name
imported>Sjwhitak
m (Grammar)
imported>Sjwhitak
m (server_name)
listen [::]:80;
}
The [https://nginx.org/en/docs/http/ngx_http_core_module.html#server_name <code>server_name</code>] directive tells nginx to use only this domain. For example, when there are subdomains or multiple domains running on a single nginx instance, you'll want correctly get the right content corresponding to each domain.
 
The [https://nginx.org/en/docs/http/ngx_http_core_module.html#root <code>root</code>] directive tells nginx where to serve files. So, inside <code>/var/www/html</code>, you'll want to have an <code>index.html</code> file in there, or more. Everything inside <code>/var/www/html</code> will be served via nginx.
Anonymous user

Navigation menu