阿里云服务器安装Apache

使用阿里云自带的安装命令:yun install httpd
安装完成之后运行命令:chkconfig --levels 235 httpd on
上面的命令可以让Apache开机自动启动。
运行命令:/etc/init.d/httpd start 让Apache立刻启动

启动过程中如果出现Could not reliably determine the server's fully qualified domain name, using 10.161.94.31 for ServerName提示,则将Apache安装目录/etc/httpd/conf/下的httpd.conf文件中的#ServerName localhost:80注释去掉即可,或是添加一行ServerName localhost:80

阿里云上Apache安装路径为/etc/httpd/


原创文章,转载请出处注明。

下面是我的个人公众号,欢迎关注交流

# Linux
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×