[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Apache on Windows - Image Directory Outside of Root?

Posted on 2007-11-29
2
Medium Priority
?
756 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

649 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