Ciao,
grazie per la risposta.
Nessun problema durante l'installazione di mod_suphp. (attraverso yum)
Si in /etc/httpd/httpd.conf c'e' un riferimento ai file di config esterna (Include conf.d/*.conf).
Quindi in /etc/httpd/conf.d/mod_suphp.conf ho:
Codice PHP:
# This is the Apache server configuration file providing suPHP support..
# It contains the configuration directives to instruct the server how to
# serve php pages while switching to the user context before rendering.
LoadModule suphp_module modules/mod_suphp.so
### Uncomment to activate mod_suphp
#suPHP_AddHandler x-httpd-php
# This option tells mod_suphp if a PHP-script requested on this server (or
# VirtualHost) should be run with the PHP-interpreter or returned to the
# browser "as it is".
#suPHP_Engine on
# This option tells mod_suphp which path to pass on to the PHP-interpreter
# (by setting the PHPRC environment variable).
# Do *NOT* refer to a file but to the directory the file resists in.
#
# E.g.: If you want to use "/path/to/server/config/php.ini", use "suPHP_Config
# /path/to/server/config".
#
# If you don't use this option, PHP will use its compiled in default path.
#suPHP_ConfigPath /etc
Ho verificato che in module/ esista il modulo mod_suphp.so.
Credo che qua dobbiamo lasciare tutto commentato per poi abilitarlo per virtualhost piuttosto che a livello globale, correggimi se sbaglio.
Grazie per il link che mi hai segnalato. Quello da una parte mi spiega altre cose e mi aiuta a capirne altre, dall'altra mi mette un pò di confusione, in quanto le soluzioni proposte nei vari tutorials che ho letto sono diverse.
Se ho ben capito suPHP per fare eseguire php con utente:gruppo del prprietario del dominio piuttosto che con apache:apache esegue php come cgi/fastcgi.
Ad esempio prendiamo il mio file /etc/suphp.conf
Codice PHP:
[global]
;Path to logfile
logfile=/var/log/suphp.log
;Loglevel
loglevel=warn
;User Apache is running as
webserver_user=apache
;Path all scripts have to be in
docroot=/var/www/vhosts/:${ HOME}/httpdocs
;Path to chroot() to before executing script
;chroot=/mychroot
; Security options
allow_file_group_writeable=false
allow_file_others_writeable=false
allow_directory_group_writeable=false
allow_directory_others_writeable=false
;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=true
;Send minor error messages to browser
errors_to_browser=true
;PATH environment variable
env_path=/bin:/usr/bin
;Umask to set, specify in octal notation
umask=0022
; Minimum UID
min_uid=500
; Minimum GID
min_gid=500
; Use correct permissions for mod_userdir sites
;handle_userdir=true
[handlers]
;Handler for php-scripts
;x-httpd-php=php:/usr/bin/php
php5-script="php:/usr/bin/php-cgi"
;Handler for CGI-scripts
x-suphp-cgi="execute:!self"
Nel tutorials che ho segnalato all'inizio (nel mio primo post) dicono di commentare la riga
Codice PHP:
x-httpd-php=php:/usr/bin/php
e aggiungere la riga
Codice PHP:
php5-script="php:/usr/bin/php-cgi"
Intanto: questo è corretto ?
Poi ho altri dubbi sulla config del file vhosts.conf del dominio spero di potertele chiedere successivamente.
Ciao
Segnalibri