Tag: HTTP状态码403

Apache2虚拟主机403禁止?

我在桌面上运行ubuntu 13.04 64位,我安装了Apache2,MySQL和PHP等 我想让我的web根目录在/home/afflicto/public_html而不是/var/www 。 所以我跟着这个指南: http://www.maketecheasier.com/install-and-configure-apache-in-ubuntu/2011/03/09 (我做了“configuration不同网站”的所有内容),因为我更喜欢这个解决scheme。 以下是我所做的: 安装了Apache2,MySQL等。 将/etc/apache2/sites-avaliable/default复制到/etc/apache2/sites-available/afflicto 。 然后编辑它,现在看起来像下面这样: 在/ etc / apache2的/网站可用/ afflicto <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /home/afflicto/public_html <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /home/afflicto/public_html/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews […]

仿效一个403错误页面

我知道你可以发送一个头,告诉浏览器这个页面是禁止的,如: header('HTTP/1.0 403 Forbidden'); 但是,我怎样才能显示在这种types的错误在服务器上创build的自定义错误页面? 默认情况下,只是发送标题显示一个白页,但我记得有一段时间回读,你可以使用客户错误页面。 有人知道吗?

当DocumentRoot指向两个不同的驱动器时,Apache给我403 Access Forbidden

当试图打开一个虚拟主机下的文件根目录位于apache所在的另一个驱动器上时,我获得了一个403访问权限。 我使用apachefriends发行版进行安装。 这是我的httpd-vhosts.conf文件: NameVirtualHost 127.0.0.1 <VirtualHost 127.0.0.1> ServerName foo.localhost DocumentRoot“C:/ xampp / htdocs / foo / public”</ VirtualHost> <VirtualHost 127.0.0.1> ServerName bar.localhost DocumentRoot“F:/ bar / public”</ VirtualHost> 当我在浏览器中打开bar.localhost时,Apache正在给我403 Access Forbidden。 我尝试设置许多不同的访问权限,即使对每个人都有完全的权利,但没有任何我试过的帮助。 编辑:谢谢! 为了将来的参考,添加“选项索引”以显示目录索引。

Apache VirtualHost 403禁止

我最近试图用Apache来设置一个testing服务器。 该网站必须在www.mytest.com域名下运行。 我总是得到一个403 Forbidden错误。 我在Ubuntu 10.10服务器版上。 doc根目录在dir /var/www 。 以下是我的设置: / var / www的内容 ls -l /var/www/ total 12 drwxr-xr-x 2 root root 4096 2011-08-04 11:26 mytest.com -rwxr-xr-x 1 root root 177 2011-07-25 16:10 index.html 服务器上的主机文件内容(IP为192.168.2.5) cat /etc/hosts 127.0.0.1 localhost 127.0.1.1 americano 192.168.2.5 americano.mytest.com www.mytest.com # The following lines are desirable for IPv6 capable hosts […]