<VirtualHost *:80>
ServerName my.domain.com
ServerAdmin admin@domain.com
DocumentRoot /var/www/my.domain.com
RewriteEngine On
<IfModule mod_fastcgi.c>
#ScriptAlias /php/ "/usr/bin/"
ScriptAlias /php/ "/usr/sbin/"
#FastCgiExternalServer /app/php/php-cgi -socket /var/run/php5-fpm.sock
FastCgiExternalServer /usr/sbin/php5-fpm -socket /var/run/php5-fpm.sock
#<Directory "/usr/bin/">
# SetHandler fastcgi-script
# Options FollowSymLinks
# Order allow,deny
# Allow from all
#</Directory>
#AddType application/x-httpd-php .php
AddHandler php-fastcgi .php
#Action php-fastcgi /php/php-cgi
Action php-fastcgi /php/php5-fpm
</IfModule>
<Directory /app/www/owncloud>
AllowOverride ALL
</Directory>
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
AllowEncodedSlashes On
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined
ServerSignature Off
</VirtualHost>
注释过的地方,是我走过的一些弯路。