| | |
Apache Alias Directive... mod_alias question
![]() |
Here's a question that I'd normally just solve myself with some testing, but I'm just looking for a quick yes or no before I get started with what I need this for.
I'm working on a VERY large website network that will have around 100 websites minimum included. All of the site data is stored in the DB, and the sites will all have the same look and feel / template, all of the PHP functions I will be using will be global to every site, and not just one.
What I want to do is share the two main directories that I have the "static" php scripts, includes, and images in.
Using the Apache Alias command I think this will work fine...
My question is this, since the Apache documentation is very brief on the Alias command, I want to make sure I'm understanding it right.
If I want the following directories to be shared by all sites, I figure I'll drop in a .htaccess file that looks something like this:
Will this direct ANYTHING within the "images" directory to the path on the server?
For example, I like to set up my images directory with several common subfolders. (icons, template, banners, etc.) So if I attempt to call the image site1.com/images/icons/icon1.gif, will this pull from the /var/storage/path/www/shared/images/icons directory, or would I need another line in the .htaccess file for each of the subdirectories?
TIA
I'm working on a VERY large website network that will have around 100 websites minimum included. All of the site data is stored in the DB, and the sites will all have the same look and feel / template, all of the PHP functions I will be using will be global to every site, and not just one.
What I want to do is share the two main directories that I have the "static" php scripts, includes, and images in.
Using the Apache Alias command I think this will work fine...
My question is this, since the Apache documentation is very brief on the Alias command, I want to make sure I'm understanding it right.
If I want the following directories to be shared by all sites, I figure I'll drop in a .htaccess file that looks something like this:
Alias /images /var/storage/path/www/shared/images Alias /includes /var/storage/path/www/shared/includes
Will this direct ANYTHING within the "images" directory to the path on the server?
For example, I like to set up my images directory with several common subfolders. (icons, template, banners, etc.) So if I attempt to call the image site1.com/images/icons/icon1.gif, will this pull from the /var/storage/path/www/shared/images/icons directory, or would I need another line in the .htaccess file for each of the subdirectories?
TIA
•
•
Join Date: Apr 2004
Posts: 3
Reputation:
Solved Threads: 0
The Alias directive allows documents to be stored in the local filesystem other than under the DocumentRoot. URLs with a (%-decoded) path beginning with url-path will be mapped to local files beginning with directory-filename.
Note that you may need to specify additional <Directory> sections which cover the destination of aliases
You can create different image alias with the same name per each virtual-host.
Note that you may need to specify additional <Directory> sections which cover the destination of aliases
You can create different image alias with the same name per each virtual-host.
![]() |
Similar Threads
- alias (read only) to a pointer (C++)
- "Forbidden / You don't have permission to access / on this server." error (Linux Servers and Apache)
- PHP Upgrade-need to down apache? (PHP)
- popen2 problem (Python)
- Apache on a nix cluster - config question (Linux Servers and Apache)
- another newbie with alot of redhat and apache server Q'S (Linux Servers and Apache)
- Apache redirection? (Linux Servers and Apache)
- Where have I gone wrong? (Linux Servers and Apache)
Other Threads in the Linux Servers and Apache Forum
- Previous Thread: using apache as a web forward
- Next Thread: Virtual Hosting Multiple Websites
| Thread Tools | Search this Thread |
.net apache asus bbc bluegene centos cisco citrix cloud cloudcomputing datacenters debian dell desktops development distributions distros drivers economy eeepc energy enterprise fedora gadgets gentoo gos government gpl hardware hp hyper-v ibm java jobs kindle knoppix kvm laptop laptops lawsuits licensing limo linustorvalds linux linuxfoundation linuxmagazine magazines microserver microsoft mobile mobilephones netbook netbooks news novell nra olpc open openmoko openoffice opensolaris opensource opensuse openvz operatingsystems os patents pc pcworld plathome politics print qumranet redhat rhel robot russia sco server servers slackware software solaris source sun supercomputer support tivo torvalds training tv ubuntu umpc unix virtualization vmware windows x86 xandros xen





