Usando o XAMPP, Erro 403 Acesso Proibido

3

Atualização (ENCONTRADA UMA SOLUÇÃO DE TRABALHO): link

 <VirtualHost *:80>
 ServerAdmin webmaster@localhost
 DocumentRoot D:/srv/xampp/projects/testproject/public
 ServerName testproject

 <Directory "D:/srv/xampp/projects/testproject/public">
  Options Indexes FollowSymLinks Includes ExecCGI
  AllowOverride All
  Order allow,deny
  Allow from all
 </Directory>
</VirtualHost>

Eu tentei reinstalar e não tive sorte. Eu estou usando o XAMPP 1.7.3, o Windows 7 64bit.

Seguiram as instruções de: 403 Erro Proibido ao tentar visualizar o host local no Apache

[Sat Oct 16 16:09:54 2010] [notice] Digest: generating secret for digest authentication ...
[Sat Oct 16 16:09:54 2010] [notice] Digest: done
[Sat Oct 16 16:09:54 2010] [notice] Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Sat Oct 16 16:09:54 2010] [notice] Server built: Nov 11 2009 14:29:03
[Sat Oct 16 16:09:54 2010] [notice] Parent: Created child process 4960
[Sat Oct 16 16:09:58 2010] [notice] Digest: generating secret for digest authentication ...
[Sat Oct 16 16:09:58 2010] [notice] Digest: done
[Sat Oct 16 16:09:59 2010] [notice] Child 4960: Child process is running
[Sat Oct 16 16:09:59 2010] [notice] Child 4960: Acquired the start mutex.
[Sat Oct 16 16:09:59 2010] [notice] Child 4960: Starting 150 worker threads.
[Sat Oct 16 16:09:59 2010] [notice] Child 4960: Starting thread to listen on port 443.
[Sat Oct 16 16:09:59 2010] [notice] Child 4960: Starting thread to listen on port 80.
[Sat Oct 16 16:09:59 2010] [notice] Child 4960: Starting thread to listen on port 443.
[Sat Oct 16 16:09:59 2010] [notice] Child 4960: Starting thread to listen on port 80.
[Sat Oct 16 16:10:30 2010] [error] [client 127.0.0.1] client denied by server configuration: C:/projects/test/
[Sat Oct 16 16:10:36 2010] [error] [client 127.0.0.1] client denied by server configuration: C:/projects/test/favicon.ico

arquivo vhosts:

NameVirtualHost *:80
<VirtualHost *:80>
    ##ServerAdmin [email protected]
    DocumentRoot "C:/projects/test"
    ServerName test
    ##ServerAlias www.dummy-host2.localhost
    ##ErrorLog "logs/dummy-host2.localhost-error.log"
    ##CustomLog "logs/dummy-host2.localhost-access.log" combined
</VirtualHost>

hosts:

# Virtual host
127.0.0.1    test
    
por Doug 17.10.2010 / 01:17

4 respostas

2

(ENCONTRADA UMA SOLUÇÃO DE TRABALHO): link

 <VirtualHost *:80>
 ServerAdmin webmaster@localhost
 DocumentRoot D:/srv/xampp/projects/testproject/public
 ServerName testproject

 <Directory "D:/srv/xampp/projects/testproject/public">
  Options Indexes FollowSymLinks Includes ExecCGI
  AllowOverride All
  Order allow,deny
  Allow from all
 </Directory>
</VirtualHost>
    
por 21.10.2010 / 12:54
2

Isso funcionou para mim com o Ubuntu 11.10 e a versão 1.7.7 no httpd.conf eu adicionei o # no diretório para que funcione com vhosts. Meus vhosts estavam localizados fora da pasta raiz ...

E altere o usuário e o grupo de ninguém para o seu nome de usuário:

User nobody
Group nobody
</IfModule>
</IfModule>

#
# 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>
    
por 17.11.2011 / 22:14
1

Na pasta apache, vá para extra e abra o arquivo httpd-xamp.conf .

Edite as seguintes linhas:

<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/8 
    ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>

Altere a configuração acima, como abaixo:

<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
    Order deny,allow
    Deny from all
    Allow from all
    ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>

Agora reinicie o XAMPP, ele funcionará.

    
por 07.02.2012 / 08:28
0

Aqui está uma atualização para versões mais recentes do XAMMP. A sintaxe mudou um pouco. Observe a linha: Exigir tudo concedido no bloco de diretório.

<VirtualHost *:80>
  ServerAdmin webmaster@localhost
  DocumentRoot D:/srv/xampp/projects/testproject/public
  ServerName testproject

 <Directory "D:/srv/xampp/projects/testproject/public">
   Options Indexes FollowSymLinks Includes ExecCGI
   AllowOverride All
   Require all granted
 </Directory>
</VirtualHost>
    
por 08.02.2014 / 20:53

Tags