[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Apache on Windows - Image Directory Outside of Root?

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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

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…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses
Course of the Month19 days, 3 hours left to enroll

834 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