?
Solved

Apache on Windows - Image Directory Outside of Root?

Posted on 2007-11-29
2
Medium Priority
?
754 Views
Last Modified: 2013-12-13
Have a test server running Apache 2 on W2K SP4 with around 10,000 images in a web directory. The problem is when I do my daily backup I am also copying these image files, which are static and really need backed up maybe once a month.

So I was wondering, is it possible for the image directory to reside outside of the apache root, or even better, outside the apache directory altogether and still show when I'm viewing the test site locally?

This way I could easily backup the apache folder each day, without backing up the thousands of images.

And if so, how would I do it? I'm assuming it isn't as simple as just calling the full path to each image in my php code.
0
Comment
Question by:formadmirer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 25

Expert Comment

by:imitchie
ID: 20379631
The way to do it is to make the Image path a virtual directory in httpd.conf, and then for the PHP code to redirect to it using relative address
0
 
LVL 25

Accepted Solution

by:
imitchie earned 1000 total points
ID: 20379635
for example

Alias /images/ "C:/notbackedup/images/"

so in your PHP code, you reference the images using

/images/imagename.gif
/images/sub1/imagename.gif

which apache will look for in the C:/notbackedup/images/ directory
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question