
ServerAlias는 Apache 서버에서 하나의 서버를 여러 도메인 이름으로 공유할 수 있는 기능입니다. ServerAlias를 사용하려면 VirtualHost 구성에서 ServerAlias를 설정해야 합니다.
예를 들어, 다음 VirtualHost 구성에서 ServerAlias를 설정한 경우:
ServerName example.com
ServerAlias www.example.com sub.example.com
DocumentRoot /var/www/html
이 구성에서는 example.com, www.example.com, sub.example.com 도메인 이름으로 하나의 서버를 공유할 수 있습니다. ServerAlias를 여러 개 설정할 수 있습니다. ServerAlias는 여러 개의 도메인 이름을 쉼표(,)로 구분하여 설정할 수 있습니다.
ServerAlias를 설정할 때는 도메인 이름을 정확하게 입력해야 합니다. 도메인 이름은 대소문자를 구분하지 않습니다. 예를 들어, ServerAlias를 www.example.com으로 설정한 경우, www.example.com, WWW.EXAMPLE.COM 모두 같은 도메인 이름으로 인식됩니다.
2025-04-01 08:45