Solved

virtualhost

Posted on 2008-10-19
4
351 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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 …
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

785 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