1,把httpd.conf中的Listen设置为你想改变的端口
2,将ServerName设为你要的网址及端口
3,
<VirtualHost *:8080>
DocumentRoot /usr/local/www
ServerName 127.0.0.1:8080
DirectoryIndex index.htm
<Directory "/usr/local/www">
Options FollowSymLinks
Require all granted
</Directory>
</VirtualHost>
在最下面把上面这句话添加进去 我要把监听的端口改成8080
时间: 2024-11-07 18:11:39