1

I have more applications that differs with URL prefixes. I can set it by "Alias" directive in httpd.conf. But I'd like to use some common files like javascripts and css files (jquery, fusioncharts, images etc.) without any prefix. For PHP files I can use set_include_path function and then include them without path prefixes. Is there a similar possibility to include another directories into DocumentRoot in Apache? I don't want to download them from another sites because users use blockers for cross-site requests.

I'd like to avoid need to copy all shared files into each aplication root.

Hink
  • 1,054
  • 1
  • 15
  • 31
  • I'm not really sure what you mean. Would virtual hosts/directories that basically allow you to have multiple websites served by the same Apache server (with separate/independent directories) be what you are after (although file wouldn't then be common)? – MikeT Aug 21 '16 at 07:16
  • My applications are f.e. "http://myserver/A" and "http://myserver/B", they have separate index.php file, but I'd like to have common css files that can be in one file and can be referenced relative f.e. as – Hink Aug 21 '16 at 07:45
  • 1
    that's beyond what I've tried/done. Glad you found a partial solution. – MikeT Aug 21 '16 at 07:53
  • Thanks for assistance, Mike. – Hink Aug 21 '16 at 07:53

1 Answers1

1

I found partial solution, If common resources are saved in separate directories, then I can use more Alias directives. New project B can use directories from existing project A, f.e.:

Alias "/B/images" "F:/EclipseWorkspaces/A/www/images"
Alias "/B/jquery" "F:/EclipseWorkspaces/A/www/jquery"
Alias "/B" "F:/Dropbox/B/WWW"

etc.

Hink
  • 1,054
  • 1
  • 15
  • 31