Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have many many many domains in a single machine. (redhat apache php mysql) and all have own admin pages. but when I update admin code it is very difficult to update all folders. then ı decided to use single code base for all my domains and in an outside of the document root of the virtual hosts. ı tried ln (symbolic links) but it says dir is not accessible altough I gave all necessary rights. any idea?

share|improve this question

1 Answer 1

use an alias for each vhost entry

Alias /admin/ /path/to/admin/files

So when they go to domain.com/admin/ it will serve files from your /path/to...

share|improve this answer
    
I did. but apache logs give me this line. [<a date>] [error] [client <an ip>] PHP Warning: Unknown: Failed opening '/path/to/admin/files/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0 –  edib Jun 27 '11 at 13:15
    
ahh.. you did change /path/to/admin/files right? –  Mike Jun 27 '11 at 13:19
    
sure, for sec reasons, i have changed those real log lines for your example. I also tried include_path in php.ini and php_value include_path in vhost.conf file –  edib Jun 27 '11 at 13:21
    
@edib: if /path/to/admin/file is not in the php include_path it will always fail, try to check that include_path settings value in a temporary phpinfo() page, and grep the source code for any ini_set (or use pĥp_admin_value in the vhost so nobody can alter this setting). –  regilero Jun 27 '11 at 19:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.