Page 1 of 1

Noob Question

PostPosted: 26. June 2008 00:56
by exn
Is it possible to host with two hard drives?

What I mean is, With xampp going can it somehow link to another hd?

PostPosted: 26. June 2008 02:37
by Danodemano
I'm not really sure what you mean. Are you intending to put the MySQL databases and htdocs (web root directory) on another hard drive? That is most certianly possible. You can also install xampp onto a dirrerent hard drive if that's what you mean.

--
Dan

PostPosted: 26. June 2008 03:03
by exn
Ok well. Ill try to explain better lol.


xampp is installed on E:\xampp\

What I am trying to do is like... link from E:\xampp\index.html to say,
D:\Images\


or somthing along those lines.

PostPosted: 26. June 2008 04:17
by Danodemano
The only way that I know how to do this (but I could be wrong), is to use the "Alias" directive in the httpd.conf file. Basically, you can re-write a directory to point anywhere you want. Example, if you wanted your images directory to exist someplace special (like on your D: drive), you could use this code in the httpd.conf:
Code: Select all
alias /images D:/Images

Make sure that you note the slash direction. This is opposite the usual Windows slash.
That would mean that if you went to localhost/images, it would be server out of that images directory on the D: drive. More info on this can be found here.

The other thing that you will likely have to do, it allow access to the directory that you are using. Once again using your example, you also need to add this into the httpd.conf file:
Code: Select all
<Directory "D:/Images">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>


I don't know of any other way to do it than that. I will also note that this takes effect across all sites you are hosting.

--
Dan