[Ubuntu] apt로 설치한 apache2
cd /etc/apache2/sites-enabled
sudo cp 000-default.conf [사이트명].conf
sudo vi [사이트명].conf
<VirtualHost *:80>
ServerName [도메인 ex> test.com]
ServerAlias [별칭 도메인 ex> www.test.com]
ServerAdmin [관리자 이메일]
DocumentRoot [디렉토리 경로 ex> /home/test/public_html]
Redirect [디렉토리] [리다리엑트 URL ex> https://www.naver.com]
ErrorLog ${APACHE_LOG_DIR}/[도메인 ex> test.com]-error.log ; errorlog 경로
CustomLog ${APACHE_LOG_DIR}/[도메인 ex> test.com]-access.log combined ; accesslog 경로
</VirtualHost>
<Directory [디렉토리 경로 ex> /home/test/public_html/] >
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>