Solved

virtualhost

Posted on 2008-10-19
4
353 Views
Last Modified: 2010-04-21
Hi gurus,

I have the following questions about Virtualhost settings.

Here 's my case:
https://secured.mysite.com   (with SSL)
http/www.mysite.com  (without SSL)

There are two paths for the said stuff.
www:         /home/mysite/docs/html
secured:      /home/mysite/secured/

How about images? Assuming my path for images is /home/mysite/docs/images/ , how can I share in virtualhost?

I wanna have both
http/www.mysite.com/images/123.gif
and
https://secured.mysite.com/images/123.gif

derived from the same path for images? So both path will use the same image file on the same path. How can I make it? Do i have to set those SSLENABLE or SSLDISABLE?

Thanks in advance!

Manfred
0
Comment
Question by:manfredino
  • 2
  • 2
4 Comments
 
LVL 12

Expert Comment

by:hfraser
ID: 22754740
Define directory aliases in each of your virtual servers for "/images" URL to point to the same physical directory.

Since you've gone to the trouble of creating two virtual servers, I'm assuming the SSL one has content that needs to be kept private. If you have some images that need to be also need to be secure, such as images of documents that should only be delivered to authenticated users over a secure channel, you should not keep them in a combined images directory, even if you've disabled directory listing. Remember that people bookmark stuff, and may not access secure images through the secure virtual server.
0
 

Author Comment

by:manfredino
ID: 22764983
Thanks a lot hfraser!

For example there's a contact form with SSL and we expect  the layout of the page look more or less the same as other pages without SSL. That's why we want to consider something like sharing images/js/css for both secured & non secured stuff.
0
 
LVL 12

Accepted Solution

by:
hfraser earned 50 total points
ID: 22765785
Then aliases are the way to do it. Something like:

Alias /images/ "/home/myysite/images/"

<Directory "/home/mysite/images">
    Options MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

in the confguration for both virtual servers will do this.
0
 

Author Closing Comment

by:manfredino
ID: 31507693
Thanks hfraser!
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Suggested Solutions

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
What You Need to Know when Searching for a Webhost Provider
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

730 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