版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/linzhaolove/article/details/22805859
搭建服务
1)启动httpd服务
service httpd restart
2)添加自己的文件
将helloworld 字符串放到 index.html文件中, 将其拷贝到 /var/www/html/文件夹下;
如果你有其他的文件,也可以拷贝到这个目录下
3)打开firefox ,输入 127.0.0.1/index.html 这样就看到hello world了;
搭建中遇到的问题和解决方法
1、提示本地命名问题
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName
将下面一行添加到 /etc/httpd/conf/httpd.conf 文件最后, 然后从新启动 httpd 服务;
ServerName localhost:80
2、selinux 问题;
打开界面时提示错误 , 原来是 selinux 没有关掉
You don't have permission to access /doxygen/ on this server.
手动关掉selinux
vim /etc/selinux/config
SELINUX=disabled
还要执行一下命令
setenforce 0