Server/Apache
[Apache] VirtualHost 설정
Gongdel
2018. 10. 7. 23:59
<VirtualHost> Directive
Description: | Contains directives that apply only to a specific hostname or IP address |
---|---|
Syntax: | <VirtualHost addr[:port] [addr[:port]] ...> ... </VirtualHost> |
Context: | server config |
Status: | Core |
Module: | core |
<VirtualHost>
and </VirtualHost>
are used to enclose a group of directives that will apply only to a particular virtual host. Any directive that is allowed in a virtual host context may be used. When the server receives a request for a document on a particular virtual host, it uses the configuration directives enclosed in the <VirtualHost>
section. Addr can be any of the following, optionally followed by a colon and a port number (or *):
- The IP address of the virtual host;
- A fully qualified domain name for the IP address of the virtual host (not recommended);
- The character
*
, which acts as a wildcard and matches any IP address. - The string
_default_
, which is an alias for*
ServerName Directive
Description: | Hostname and port that the server uses to identify itself |
---|---|
Syntax: | ServerName [scheme://]domain-name|ip-address[:port] |
Context: | server config, virtual host |
Status: | Core |
Module: | core |
The ServerName
directive sets the request scheme, hostname and port that the server uses to identify itself.
원문 : https://httpd.apache.org/docs/current/en/mod/core.html#virtualhost