본문 바로가기

Computer/Linux

아파치서버 포트 변경


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

 

Listen 80

# 위 80번 포트를 아래와 같이 8080 포트로 변경

Listen 8080

 

<IfModule ssl_module>

Listen 443   

</IfModule>  

 

<IfModule mod_gnutls.c>  

Listen 443   

</IfModule>  

 

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet 



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

<VirtualHost *:80>

위 포트를 아래와 같이 변경

<VirtualHost *:8080>




sudo service apache2 restart