前端html页面我是打算用apache服务器运行
下载apache
在Xshell输入代码
yum install httpd httpd-devel
输入y确认
启动并且验证
service httpd start
service httpd status
配置apache文件
1.找到apache的配置文件apache2.conf
cd /etc/apache2
vim apache2.conf
2.添加如下代码
NameVirtualHost 39.xx.xxx.xxx.xx
<VirtualHost 39.xx.xxx.xxx.xx >
<VirtualHost www.xxx.xxx>
39.xx.xxx.xxx.xx :阿里云公网ip
www.xxx.xxx:域名(没有也可以不设置)
3.ESC后:wq保存退出
4.C