Linux(Centos)Apache安装配置过程中可能出现的错误
来源:互联网 发布:android final数组 编辑:程序博客网 时间:2024/06/03 19:35
httpd:unrecognized service
//将apache安装为系统服务cp /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/httpd//然后 vi /etc/rc.d/init.d/httpd 添加(#!/bin/sh下面)chkconfig: 2345 50 90description: Activates/Deactivates Apache Web Server//最后,运行chkconfig把Apache添加到系统的启动服务组里面:chkconfig --add httpdchkconfig httpd on//然后再service httpd start
httpd: Could not reliably determine the server’s fully qualified domain name
//用记事本打开 httpd.conf//将里面的 #ServerName localhost:80 注释去掉即可。//再执行 httpd//然后可以通过浏览器访问 http://localhost:80 ,如果页面显示 “It works!” ,即表示apache已安装并启动成功。
You don’t have permission to access / on this server
原来是因为我的虚拟主机目录为非apache安装目录下的htdocs,所以违反了apache对默认对网站根访问权限。
apache的默认虚拟主机根目录地址为../Apache Software Foundation/Apache2.2/htdocs 目录下,需要对httpd.conf文件进行修改才能指向其他目录。
在httpd.conf
文件下找到这段:
<span style="font-size: x-small;">## Each directory to which Apache has access can be configured with respect# to which services and features are allowed and/or disabled in that# directory (and its subdirectories). ## First, we configure the "default" to be a very restrictive set of # features. #<Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all</Directory></span>
将之修改为
<span style="font-size: x-small;"># 允许指向外部的目录进行访问<Directory /> Options Indexes FollowSymLinks AllowOverride None</Directory></span>
重启httpd。
0 0
- Linux(Centos)Apache安装配置过程中可能出现的错误
- 安装Apache的过程中所出现的一些错误
- Android Studio升级过程中可能出现的错误
- 在虚拟机中安装centos可能出现的问题
- CentOS 安装Oracle 11gR2步骤和一些安装过程中出现的错误(整理)
- 免安装版MySQL(绿色版)配置过程及安装过程中可能出现的问题详解
- 安装EVC过程中可能出现的问题
- SQL Server2005安装过程中可能出现的问题
- Linux Nginx安装以及可能出现错误
- Linux Nginx安装以及可能出现错误
- centos安装caffe python接口时候可能出现错误
- Android - MonkeyRunner配置或安装过程中出现错误解决办法
- linux软件安装中可能出现的问题
- chef安装过程可能出现的问题
- Linux CentOS 安装 Apache PHP MYSQL Memcached Memcache 环境配置 并且辅助安装遇见的错误处理(全文搜索
- Ubuntu下安装tomcat的过程以及可能出现的错误
- 安装Win+Centos过程中出现的两个问题
- 编译中可能出现的错误
- 第九周项目3-(1)稀疏矩阵的三元组表示
- Spring: @Transactional中的propagation属性
- nginx 获取真实IP
- 第十周--项目3用二叉树遍历思想解决问题(3)(4)
- Arduino编程从基础到实践——互动出版网
- Linux(Centos)Apache安装配置过程中可能出现的错误
- 自己写的一个请求
- 预测产品的分词结果、相似度降序排序.
- 项目三(2)
- Android之NetworkOnMainThreadException异常
- 第10周—项目3(1)计算二叉树节点个数
- 使用硬件层来实现灰度视图
- BootStrap学习笔记-2
- android中在指定的界面中插入引导页