好的,这就是我为使事情正常工作所做的:
一、启用userdir
sudo a2enmod userdir
然后,编辑/etc/apache2/mods-enabled/php5.conf
<IfModule mod_php5.c>
<FilesMatch "\.ph(p3?|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
# To re-enable php in user directories comment the following lines
# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
<IfModule mod_userdir.c>
<Directory /home/*/public_html>
#php_admin_value engine Off
</Directory>
</IfModule>
</IfModule>
请注意,我注释掉了php_admin_value
允许 PHP。
然后,创建了一个虚拟主机:
<VirtualHost *:80>
ServerName philknight.localhost
DocumentRoot /home/aubrey/public_html/philknight-wordpress
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /home/aubrey/public_html/philknight-wordpress>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
而且,确切地说,in/home/aubrey/public_html/philknight-wordpress
能够wp-content
在我的主文件夹中创建指向其他地方的链接。/home/aubrey/Documents/Projects & Companies/Excion/Metz Tennis/PhilKnight/wp-content/themes/philknight
我使用了常见的SHIFT_CTRL
拖动方法,但我相信ln -s
也可以。
希望这对任何人都有帮助,如果您有任何问题,请发表评论...
权限:
drwxrwxrwx 4 www-data www-data 4096 Aug 20 18:46 /home/aubrey/public_html
drwxrwxrwx 8 aubrey aubrey 4096 Aug 20 21:11 /home/aubrey/Documents/Projects & Companies/Excion/Metz Tennis/PhilKnight/wp-content
也不得不chmod 777 -R /home/aubrey/Documents/Projects & Companies/Excion/Metz Tennis/PhilKnight/wp-content/plugins
和/home/aubrey/Documents/Projects & Companies/Excion/Metz Tennis/PhilKnight/wp-content/themes