NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
devbobo
Nov 29, 2009Aspirant
HOW TO: Hosting multiple websites
G'day Guys, For some time I've wanted to host multiple websites from a single ReadyNAS unit...I haven't had the time to investigate it. 1. Backup all the .conf files in /etc/frontview/apache 2....
WhoCares_
Jul 15, 2012Mentor
leoj3n wrote: As far as adding the /images/ Alias to *.vhost: what is your stance on that? Would that end up intercepting any /images/ directory in a non-directory-listing scenario? (i.e: if you put an /images/ folder in the site dir and linked to an image in there from index.html like <img src='images/mycoolimage.png' />)
As with most config settings for Apache the answer is: "It depends." ;)
To make that a bit more clearer, we first have to look at what the 'Alias' command does and how it works. The basic function of the 'Alias' command is to tell Apache, where to look for files that are requested from a specific path. So, if we are to have something like
Alias /images/ /foo/
in the Apache configs, and then a request for 'www.some.url/images/test.gif' comes in, Apache would try to fetch the file '/foo/test.gif' from the local file system. So basically, Alias maps a location from the request to a location on the physical drive. That said, there are (at least) two different places where you can have an 'Alias' definition: The server config, which would create a global alias, and the VHost config, which creates an Alias only known within a virtual host. Now, *all* global Aliases are known within virtual hosts as well. And since Netgear's original configuration contains a global 'Alias /images/ ...' statement, you can add aliases to virtual hosts or even have a real images directory there until you're blue in the face - Apache will still always try to fetch images from the location named in the first and global 'Alias' statement. That's also why you're seeing the error saying 'Alias will never match ...' in your config. Which in turn brings me to the conclusion that you either used an old version of my configs or only parts of those, for one major change my configs bring is that there aren't *any* global Alias statements anymore. (Well, at least there shouldn't be any). So, it would be interesting to learn which config you used for your ReadyNAS.
-Stefan
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!