Setare Apache

Discuţii despre serverele web pe care poate rula PHP: Apache, Internet Information Server (IIS), nginx, lighttpd.

Discuţii despre cloud computing: Amazon Web Services, Azure, Google App Engine, Cloudflare

Moderator: Moderatori

ntibix
New Member
Mesaje: 4
Membru din: Lun Oct 15, 2012 9:51 pm

Setare Apache

Mesajde ntibix » Lun Oct 22, 2012 8:05 pm

Salutare!
Pe sistemul meu AchLinux
in /srv/http/ am un symlink catre /mnt unde este index.php.
Daca incerc
$ firefox localhost/mnt/index.php
nu apare nimic in fereastra firefox si nici o eroare .

/mnt drept acces 777 owner root group root
index.php drept acces 777 owner tibi group tibi .

Continut file /etc/httpd/conf/httpd.conf :

Cod: Selectaţi tot

<Directory "/srv/http">
     Options Indexes FollowSymLinks ExecCGI Includes
   
     AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

$ php /mnt/index.php functioneaza.

Multumesc.



Avatar utilizator
ierolohitis
PHPRomania Supporter
Mesaje: 6
Membru din: Dum Oct 21, 2012 11:03 am
Contact:

Re: Setare Apache

Mesajde ierolohitis » Mar Oct 23, 2012 4:37 am

da un paste la log-ul apache-ului cand ai 775 pe /srv/http

ntibix
New Member
Mesaje: 4
Membru din: Lun Oct 15, 2012 9:51 pm

Re: Setare Apache

Mesajde ntibix » Mar Oct 23, 2012 9:01 pm

Am schimbat 775 la /srv/http.
Dupa
$ firefox localhost
$ firefox localhost/index.php
$ firefox localhost/mnt/index.php
$ firefox localhost/mnt/tibi.php

In /var/log/httpd/access_log apare :

::1 - -[23/Oct/2012:20:38:19 +0300] "GET /index.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2524
::1 - - [23/Oct/2012:20:38:19 +0300] "GET /index.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2146
::1 - - [23/Oct/2012:20:41:10 +0300] "GET /mnt/tibi.php HTTP/1.1" 500 -
::1 - - [23/Oct/2012:20:47:59 +0300] "GET /mnt/index.php HTTP/1.1" 500 -

ntibix
New Member
Mesaje: 4
Membru din: Lun Oct 15, 2012 9:51 pm

Re: Setare Apache

Mesajde ntibix » Mar Noi 27, 2012 12:06 am

In /etc/php/php.ini am adaugat /mnt/ la linia

Cod: Selectaţi tot

open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/ :/mnt/

si merge.

Avatar utilizator
ierolohitis
PHPRomania Supporter
Mesaje: 6
Membru din: Dum Oct 21, 2012 11:03 am
Contact:

Re: Setare Apache

Mesajde ierolohitis » Joi Dec 06, 2012 4:35 pm

bine atunci ....

de retinut e ca log-urile de apache spun multe ;)

o intrebare - de ce nu folosest virtual host daca iti lucrezi diferite aplicatii pe un server personal (pp ca de asta te chinui asa) ?

ntibix
New Member
Mesaje: 4
Membru din: Lun Oct 15, 2012 9:51 pm

Re: Setare Apache

Mesajde ntibix » Joi Dec 06, 2012 8:06 pm

Toate documentele sunt pe o alta partitie .Am trecut recent pe ArchLinux.
Pe SO anterioare am folosit Xampp nu a trebuit sa fac nici o configurare.
Montarea partitie o faceam de obicei in /mnt/partitie dupa care faceam un symlink in /opt/lampp/http/ catre directorul "mnt"
prin care accesam toate documentele php de pe partitie.
Pe Arch am renunta la Xampp si am instalat normal Apache si Mysql si asa au aparut problemele cu /mnt .


Înapoi la “Servere Web”

Cine este conectat

Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 18 vizitatori