Salut
voila un vhost:
<VirtualHost *:80>
ServerAdmin
webmaster@mysite.com ServerName
www.mysite.com
ServerAlias
mysite.com *.
mysite.com DocumentRoot /var/www/mysite
# <Directory />
# Options FollowSymLinks
# AllowOverride None
# </Directory>
<Directory /var/www/mysite/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
suphp.conf:
[global]
;Path to logfile
logfile=/var/log/suphp/suphp.log
;Loglevel
loglevel=info
;User Apache is running as
webserver_user=www-data
;Path all scripts have to be in
docroot=/var/www:${HOME}/public_html
;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=false
;PATH environment variable
env_path=/bin:/usr/bin
;Umask to set, specify in octal notation
umask=0022
; Minimum UID
;min_uid=100
min_uid=33
; Minimum GID
;min_gid=100
min_gid=33
[handlers]
;Handler for php-scripts
application/x-httpd-suphp="php:/usr/bin/php-cgi"
;Handler for CGI-scripts
x-suphp-cgi="execute:!self"
x-httpd-suphp="php:/usr/bin/php-cgi"
dans error.log pour les sites encore en erreur 500 (car ils ont un fichier appartenant a myuser)
[Tue Feb 18 16:07:43 2014] [error] [client xxx.xxx.xxx.xxx] SoftException in Application.cpp:555: Directory /var/www/mysite2 is not owned by myuser
[Tue Feb 18 16:07:43 2014] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: index.php