Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: localhost - 403 Forbidden
Forum PHP.pl > Inne > Hydepark
michat34
witam zainstalowalem ostatnio na nowym windowsie 8 wamp server. gdy wchodze wyrzuca mi 403 forbidden (na xamppie tez). na poprzednim win 7 nie bylo tego problemu, nie wiem czy to kwestia windowsow ale na wszelki wypadek mowie. jak moge to naprawic, jakies zmieny w http.conf? patrzylem na kilku stronach, zmienialem deny from all, dopisywalem .80 do allow to 127.0.0.1 ale nic..

http.conf:

Kod
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
ServerAdmin admin@localhost

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName localhost:80

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "c:/wamp/www/"

#
# 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
    Allow from all
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "c:/wamp/www/">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # [url="http://httpd.apache.org/docs/2.2/mod/core.html#options"]http://httpd.apache.org/docs/2.2/mod/core.html#options[/url]
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride all

    #
    # Controls who can get stuff from this server.
    #

#   onlineoffline tag - don't remove
    Order Deny,Allow
    Allow from all
    Allow from 127.0.0.1

</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.php index.php3 index.html index.htm
</IfModule>

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</FilesMatch>
qba10
Zobacz czy masz odpowiednie uprawneinia dla katalogów i plików.
Windows 8 daje inne uprawnienia dla partycji sytemowej niż Windows 7 ( tak mi się wydaje, aczkolwiek windowsa 7 nie używałem)
michat34
na forum wampa dostalem odpowiedz ze to problem z 'host files'. ktos Lapie o co biega?
webdice
Do error loga zaglądałeś?

PS. Kod proszę umieszczać w odpowiednich znacznikach.
michat34
access
  1. ::1 - - [10/Nov/2012:18:18:38 +0100] "GET / HTTP/1.1" 403 202
  2. ::1 - - [10/Nov/2012:18:20:12 +0100] "GET / HTTP/1.1" 403 202
  3. ::1 - - [10/Nov/2012:18:20:12 +0100] "GET / HTTP/1.1" 403 202
  4. ::1 - - [10/Nov/2012:18:20:13 +0100] "GET / HTTP/1.1" 403 202
  5. ::1 - - [10/Nov/2012:18:20:13 +0100] "GET / HTTP/1.1" 403 202
  6. ::1 - - [10/Nov/2012:18:20:13 +0100] "GET / HTTP/1.1" 403 202
  7. ::1 - - [10/Nov/2012:18:20:13 +0100] "GET / HTTP/1.1" 403 202
  8. ::1 - - [10/Nov/2012:18:21:15 +0100] "GET / HTTP/1.1" 403 202
  9. ::1 - - [10/Nov/2012:18:29:40 +0100] "GET / HTTP/1.1" 403 202
  10. ::1 - - [10/Nov/2012:18:29:41 +0100] "GET / HTTP/1.1" 403 202


apache_error
  1. [Sat Nov 10 18:18:22 2012] [notice] Apache/2.2.22 (Win64) PHP/5.3.13 configured -- resuming normal operations
  2. [Sat Nov 10 18:18:22 2012] [notice] Server built: May 13 2012 19:41:17
  3. [Sat Nov 10 18:18:22 2012] [notice] Parent: Created child process 36
  4. [Sat Nov 10 18:18:22 2012] [notice] Child 36: Child process is running
  5. [Sat Nov 10 18:18:22 2012] [notice] Child 36: Acquired the start mutex.
  6. [Sat Nov 10 18:18:22 2012] [notice] Child 36: Starting 64 worker threads.
  7. [Sat Nov 10 18:18:22 2012] [notice] Child 36: Starting thread to listen on port 80.
  8. [Sat Nov 10 18:18:22 2012] [notice] Child 36: Starting thread to listen on port 80.
  9. [Sat Nov 10 18:18:38 2012] [error] [client ::1] client denied by server configuration: C:/wamp/www/
  10. [Sat Nov 10 18:20:12 2012] [error] [client ::1] client denied by server configuration: C:/wamp/www/
  11. [Sat Nov 10 18:20:12 2012] [error] [client ::1] client denied by server configuration: C:/wamp/www/
  12. [Sat Nov 10 18:20:13 2012] [error] [client ::1] client denied by server configuration: C:/wamp/www/
  13. [Sat Nov 10 18:20:13 2012] [error] [client ::1] client denied by server configuration: C:/wamp/www/
  14. [Sat Nov 10 18:20:13 2012] [error] [client ::1] client denied by server configuration: C:/wamp/www/
  15. [Sat Nov 10 18:20:13 2012] [error] [client ::1] client denied by server configuration: C:/wamp/www/
  16. [Sat Nov 10 18:21:15 2012] [error] [client ::1] client denied by server configuration: C:/wamp/www/
  17. [Sat Nov 10 18:29:40 2012] [error] [client ::1] client denied by server configuration: C:/wamp/www/
  18. [Sat Nov 10 18:29:41 2012] [error] [client ::1] client denied by server configuration: C:/wamp/www/


tak wiec ktos wie o co biega z tym host file dla win8?
abort
::1 to adres loopbacka w protokole IPv6, w IPv4 jest to 127.0.0.1.
Dlaczego tam jest ipv6 - nie wiem. Wiem tylko tyle, że używanie ipv6 aktualnie jeszcze nie jest zbyt rozpowszechnione, i w domu po prostu wyłączyłem cały stos v6.
sazian
plik hosts w win jest tu %SystemRoot%\system32\drivers\etc\hosts

ale ja myślę że to problem z uprawnieniami do katalogu

ewentualnie zawsze możesz zmienić system smile.gif
rocktech.pl
Witam.

A ta dyrektywa... zmień na to.
[APACHE] pobierz, plaintext
  1. Order Deny,Allow
  2. Allow from all
  3. Allow from 127.0.0.1 localhost
[APACHE] pobierz, plaintext
abort
Masz w pliku coś takiego:
Kod
    Order Deny,Allow
    Allow from all
    Allow from 127.0.0.1

Zmień to na:
Kod
    Order allow,deny
    Allow from all

Chodzi oczywiście o sekcję <Directory "c:/wamp/www/">
Napisz, jak efekty.
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.