ubuntu下apache更改端口的方法

 

step1:修改监听端口以及主机端口为8080

 

  1. sudo vi /etc/apache2/ports.conf

 

  1. NameVirtualHost *:8080
  2. Listen 8080

 

 

step2: 只要修改virtualHost的端口即可

 

  1. <VirtualHost *:8080>

 

 

step3:重启apache2

 

  1. sudo service apache2 stop
  2. sudo service apache2 start

Tagged: , , ,

Comments are closed.