CentOS 7.7 64位阿里云Apache服务器一个域名搭建多个网站详细流程
首先修改vhost(etc/httpd/confd) ,
<VirtualHost *:81>
ServerName test.com
ServerAlias www.test.com
DocumentRoot /var/www/html/test.com
DirectoryIndex index.htm index.html index.php
</VirtualHost>
<Directory "/var/www/html/test.com">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
http(etc/httpd/conf)文件,加自己的端口根据模板加
listen 81,
打开控制台,添加解析记录,修改安全组规则
重启apache
systemctl restart httpd