apache --访问私人web时出现403错误
来源:百度文库 编辑:神马文学网 时间:2024/05/01 17:15:52
问题1:
[root@centos45 ~]# /etc/rc.d/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: httpd: Could not determine the server‘s fully qualified domain name, using 127.0.0.1 for ServerName
# vi /etc/httpd/conf/httpd.conf [添加]
ServerNamewww.centos45.com:80
问题2:访问 http://10.10.7.246/~feng 时,提示错误:
Forbidden
You don‘t have permission to access /~feng on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
经做步骤:
# vi /etc/httpd/conf/httpd.conf
。。略。。
#UserDir disable
UserDir public_html
。。略。。
AllowOverride All
Options IncludesNoExec ExecCGI FollowSymLinks
Order allow,deny
Allow from all
Order deny,allow
Deny from all
# su - feng
$ cd
$ mkdir public_html
$ chmod 755 public_html
$ chmod 755 ~ [很重要]
缺乏步骤:[问题所在点]
[root@centos45 home]# ls -Z feng
drwxr-xr-x feng feng user_u:object_r:user_home_t public_html
[root@centos45 home]# chcon -R -t httpd_user_content_t feng/public_html/
[root@centos45 home]# ls -Z feng
drwxr-xr-x feng feng user_u:object_r:httpd_user_content_t public_html
参考资料:
http://wuhuizhong.itpub.net/post/11594/281904
[root@centos45 ~]# /etc/rc.d/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: httpd: Could not determine the server‘s fully qualified domain name, using 127.0.0.1 for ServerName
# vi /etc/httpd/conf/httpd.conf [添加]
ServerNamewww.centos45.com:80
问题2:访问 http://10.10.7.246/~feng 时,提示错误:
Forbidden
You don‘t have permission to access /~feng on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
经做步骤:
# vi /etc/httpd/conf/httpd.conf
。。略。。
#UserDir disable
UserDir public_html
。。略。。
AllowOverride All
Options IncludesNoExec ExecCGI FollowSymLinks
Order allow,deny
Allow from all
Order deny,allow
Deny from all
# su - feng
$ cd
$ mkdir public_html
$ chmod 755 public_html
$ chmod 755 ~ [很重要]
缺乏步骤:[问题所在点]
[root@centos45 home]# ls -Z feng
drwxr-xr-x feng feng user_u:object_r:user_home_t public_html
[root@centos45 home]# chcon -R -t httpd_user_content_t feng/public_html/
[root@centos45 home]# ls -Z feng
drwxr-xr-x feng feng user_u:object_r:httpd_user_content_t public_html
参考资料:
http://wuhuizhong.itpub.net/post/11594/281904
apache --访问私人web时出现403错误
apache禁止访问目录列表
web服务器总是提示:跟后台打印程序系统服务通信时出现错误 怎么解决啊?
Apache No services installed 错误
火车采集器出现"WEB发布是否成功未知",错误原因和解决办法
安装VS2003英文版时出现错误
减肥时容易出现的错误a
apache架设http的web服务器
Linux Apache Web服务器基础知识介绍
Tomcat与Apache Web服务器的整合
Lighttpd Squid Apache搭建高效率Web服务器
关于Apache Axis2的Web service消息
Lighttpd+Squid+Apache搭建高效率Web服务器
Lighttpd+Squid+Apache搭建高效率Web服务器
他信抵达英国伦敦进行“私人”访问
解决Window环境下启动Hadoop时出现 java.lang.NoClassDefFoundError: org/apache/hadoop/util
Apache安装 APR-util错误解决
Apache日志分析 之 访问日志(一)
redhatEnterprise4下的apache怎么访问别的目录? CentOS
Win XP安装时出现错误的解决方案
关于ACCESS打开表时出现“未知”错误的总结
电脑开机时出现ntvdm遇到一个硬错误
登陆MSN时,出现80072eff的错误,怎么解决
宽带连接时出现错误678的提示