본문 바로가기

Others

Ubuntu Apache 웹 서버 띄우기

apache2 install

sudo apt install apache2

 

DocumentRoot 수정

sudo nano /etc/apache2/sites-available/000-default.conf

 

포트설정(Optional)

리스너 포트 설정 /etc/apache2/ports.conf 변경

sudo nano /etc/apache2/ports.conf

 

문서 안에 아래와 같은 설명이 있다

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf

 

/etc/apache2/sites-available/000-default.conf 수정

sudo nano /etc/apache2/sites-available/000-default.conf

<VirtualHost *:80> 포트번호 변경