Jump to content
php.lv forumi

Apache user mape Forbidden


mandarīnpīle

Recommended Posts

Uz Linux tikko ieinstalēju Apache. Mapju konfigs:

DocumentRoot "/srv/http"

# 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>

#
# 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 "/srv/http">
    
     Options Indexes FollowSymLinks
     AllowOverride None
     Order allow,deny
     Allow from all

</Directory>

 

 

Ja kāds php fails ir novietots tiesi /srv/http/ mapē, es to varu palaist. Ja ir kāda apakšmape, piemēram, /srv/http/webpage/ un tajā atrodas php fails, es saņemu tikai tekstu "Directory access is forbidden." Kas un kur ir jāmaina, lai apakšmapes strādātu?

 

EDIT: Liekas, ka parasti php faili parastās mapēs strādā, bet es centos palaist CodeIgniter defaultā nokačāto aplikāciju. Liekas, ka to erroru izmet nevis pats Apache, bet Codeigniters..

Edited by mandarīnpīle
Link to comment
Share on other sites

apskaties apache LOGā

 

Izdzēsu visu to, kas tur bija sakrājies, un iegāju tajā aplikācijā, kas rādija "Directory access ir forbidden.", respektīvī URL http://localhost/codeigniter/application/ un tad LOGos paradījās šis:

 

Error_log:

 

[Thu Jul 11 19:24:20 2013] [error] [client 127.0.0.1] File does not exist: /srv/http/favicon.ico
[Thu Jul 11 19:24:24 2013] [error] [client 127.0.0.1] File does not exist: /srv/http/favicon.ico

 

Access_log:

 

127.0.0.1 - - [11/Jul/2013:19:24:20 +0300] "GET /codeigniter/ HTTP/1.1" 200 2048
127.0.0.1 - - [11/Jul/2013:19:24:20 +0300] "GET /favicon.ico HTTP/1.1" 404 1061
127.0.0.1 - - [11/Jul/2013:19:24:24 +0300] "GET /favicon.ico HTTP/1.1" 404 1061

 

Kas te būtu darāms?

Edited by mandarīnpīle
Link to comment
Share on other sites

Atļāva Tev ieiet /codeigniter/ direktorijā. Pamēģini /codeigniter/index.php , ja tur tāds fiziski vispār ir.

 

To "Directory access ir forbidden." met laukā tā programma.

 

Serveris parasti izmet  "403 Forbidden" .Vismaz headerī.

 

Nepareizi uzinstalēts Codeigniters.

Edited by blackhalt
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...