I try share a WordPress plugin directory between two sites. The problem is that the scripts are working but not the URLS. They are output in a strage way that the path is in there when it should not. And this has nothing to do with the plugin or anything, this works right of I not use symlinks.
http://demo.secret.local/bla/wp-content/plugins/var/www/shared/plugins/debug-bar/css/debug-bar.css?ver=20111209
sudo chown -R "$USER":www-data /var/www
find /var/www -type f -exec chmod 0660 {} \;
sudo find /var/www -type d -exec chmod 2770 {} \;
tryed 777 permissions as well but seem not to make a difference
/var/www/shared/plugins <- Files are working, URLS get screweed up
/var/www/secret.com/htdocs/wp-content/plugins -> symlinked to -> /var/www/shared/plugins
/var/www/demo.secret.com/htdocs/wp-content/plugins -> symlinked to -> /var/www/shared/plugins
.
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName secret.local
DocumentRoot /var/www/secret.com/htdocs
<Directory />
Options FollowSymLinks Indexes
AllowOverride All
</Directory>
<Directory /var/www/secret.com/htdocs/>
Options Indexes FollowSymLinks
AllowOverride All
Order deny,allow
deny from all
allow from 127.0.0.1
</Directory>
ErrorLog ${APACHE_LOG_DIR}/secret.com-error.log
CustomLog ${APACHE_LOG_DIR}/secret.com-access.log combined
</VirtualHost>
Same for the other VHost
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName demo.secret.local
DocumentRoot /var/www/demo.secret.com/htdocs
<Directory />
Options FollowSymLinks Indexes
AllowOverride All
</Directory>
<Directory /var/www/demo.secret.com/htdocs/>
Options Indexes FollowSymLinks
AllowOverride All
Order deny,allow
deny from all
allow from 127.0.0.1
</Directory>
ErrorLog ${APACHE_LOG_DIR}/demo.secret.com-error.log
CustomLog ${APACHE_LOG_DIR}/demo.secret.com-access.log combined
</VirtualHost>
I had this setup before and was actually just symlinking to the other site. I am not sure but I think I had it before that It was actaully working when I disabled the site where I linked to. Thats why I now moved the shared folder completely out of both sites. But now I have the same issue. This is driving me crazy.
I could just mount the directory there and be fine but then if I accidentally delete the mounted folder I will delete the files. And this should work with symlinks. Please tell me how.
I also tryed a 3rd directory block to /var/www/shared with the same rules as the .com directorys but this not seem to make any difference.
Sidequestion: I do not really understand this section.
<Directory />
Options FollowSymLinks Indexes
AllowOverride All
</Directory>