Hi! I've got a MAMP-system (Mac, Apache, MySQL, PHP) set up and it's working fine. I would like to host a site with enormous video files, we're talking Red files and HD files. The videos won't be streamed to the visitor but visitors will be able to download them. My problem is i don't know if we'll be able to fit them all on the same hard drive as our Apache web root, and therefore not INSIDE the web root. Is it possible to place the files elsewhere on the server and then have Apache (or maybe by using PHP?) locating the files so the website visitors will be able to download them? I've been looking at the file_get_contents() PHP function but my guess is, without having actually tested the function, that will be too demanding for our server since the HD/RED files are between 2 - 4 Gb, what do you think? Thanks in advance!
Just use a subdomain (or even a different alias) for them. See this documentation page for more information.
Ah, that's fantastic Luke! But i don't get it, where do i put the example code: Alias /image /ftp/pub/image <Directory /ftp/pub/image> Order allow,deny Allow from all </Directory> Should i put that code in a .htaccess file or something like it?
Hi, I'm assuming you have a dedicated server or VPS? You need to insert it into your Apache virtualhost file for the domain - exactly where depends on your operating system, how you installed Apache and how you configured your domain. Usually, you'll find your virtualhost in /etc/apache2 or /etc/httpd - if you tell me which distribution you're running I'd be able to help you a little more. Good luck!
Thanks again Luke! It's actually not my server, i'm hired by a company to build a website for them, and this company have their own server and host one other website already. But unfortunately the guy who set up this server has quit the company, and neither of us are server techs. Bummer. All i can find right now is this info: Apache/1.3.41 (Darwin) mod_jk/1.2.6 mod_ssl/2.8.31 OpenSSL/0.9.7l PHP/4.4.9 mod_perl/1.29 ...and: Darwin Mac-server.local 8.11.0 Darwin Kernel Version 8.11.0 I also see (using php_info()) that "Virtual Directory Support" is disabled, is that a bad thing? What is this virtualhost file called? Just "virtualhost"?
It looks to me like your site is hosted on a Mac (Darwin is the name of the core of the Mac OS X operating system). It also seems as though you're running an older version of Apache (two major releases have come out since 1.3 - 2.0 and 2.2). Although I have experience with neither, I presume the setup process is fairly similar. Now, the location of the virtual host depends on how the server was configured. In older, more traditional setups, all of the virtual hosts are stored in a file called httpd.conf. As I said above, the location of this file is dependant on how Apache was installed (compiled from source or installed from a pre-built package). Assuming the server has a utility called mlocate installed (it usually is on Linux operating systems, and Mac OS is very similar), you can run the following commands to update the search database and find all of the files: updatedb locate httpd.conf Code (markup): If you run those and post the output here, I'll see if I can't help you out. If you get an error about a file not being found, mlocate isn't installed. I've never used a Mac so I don't know how to install the package, but I can ask around to find out for you As for virtual directory support, I believe this is related to IIS (Microsoft's webserver offering) so it's unimportant here. Good question, though Good luck!