Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CNAME for a directory

Posted on 2004-10-25
8
Medium Priority
?
1,370 Views
Last Modified: 2013-12-20
Greetings experts,
I have been asked to provide the following for our web server.
A clients specific directory, we will call bigcompany, has a directory located on our webserver.  So when the client goes to the url:  server.domainname.net/bigcompany.
The bigcompany directory has all the site pages, etc that most web hosting server do.  Now the client wants to use their own server for hosting but still have the original url: server.domainname.net/bigcompany
Question: can this be configured using a CNAME?  If so what are the procedures.  I have configured a CNAME in the past but it was for a complete site not just a directory.  So previously i had something similar to this:
The url is w2.domainname.com which points via cname to www.otherserver.com.  And the url w2.domainname.com is always listed in the url address bar.  So the end user never knows that the site is on a different server.
Thanks of the help.
0
Comment
Question by:EaglePress
[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
  • 3
  • 3
  • 2
8 Comments
 
LVL 33

Assisted Solution

by:humeniuk
humeniuk earned 300 total points
ID: 12404275
You were able to use a DNS solution in the other case because you were forwarding a subdomain.  This won't work with a folder.  However, you can accomplish this by setting up a virtual directory on your web server within the server.domainname.net website that points the bigcompany directory to their own web server.  Essentially, DNS will continue to refer traffic to your web server, but the content for that particular folder will come from their web server.

How to do this depends on what server platform you are using.  So, what are you using - Windows/IIS? Linux/Apache? Something else?

For the record, I don't think this is an ideal solution.  For one thing, they will have two points of failure - if either web server goes down, their site will be unavailable.  It also results in more traffic and less efficiency.  It would be much preferable for them to get their own domain name (ie. bigcompany.com) or to use a subdomain (ie. bigcompany.domainname.net).  If they used their own domain name, you could put a permanent redirect on your website forwarding server.domainname.net/bigcompany to www.bigcompany.com.  You could leave the redirect in place as long as necessary to get the new domain name established.  If they used a subdomain, you could then use DNS to point server.domainname.net to your IP address and bigcompany.domainname.net to their IP address.  Again, you could set up a permanent redirect from server.domainname.net/bigcompany to bigcompany.domainname.net until people got the idea and updated their bookmarks, etc.
0
 

Author Comment

by:EaglePress
ID: 12404396
Thanks for the quick response.
I FULLY agree with your opinion on the "for the record" portion of the response.  But the solution I outlined is what was requested so I must make it happen.  But for the record (on my part) it does cause more administrative headaches, more network traffic and slower performance.
Now.
We are using an apache web server.  I have never tried to confiure a virtual directory using apache, but have done this many times using IIS 5 & 6.  If you have any suggested guideline for configuring the apache virtual directory, i would greatly appreciate the assistance.
0
 
LVL 33

Expert Comment

by:humeniuk
ID: 12404781
"But the solution I outlined is what was requested so I must make it happen."
I understand the situation - have been in it myself.

Unfortunately, I'm not that experienced with Apache, so I wouldn't want to advise you on this.  Periwinkle is the resident Apache expert in this TA and should be along soon.  I'm sure he'll be able to give you the details.
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 15

Accepted Solution

by:
periwinkle earned 200 total points
ID: 12405077
Thanks Andrew - I'm here, even if I'm a 'she', and not a 'he' ;) ....

If I understand correctly, your client wants to 'forge' the urls to be on your server, when in fact they are actually coming from their own.  

I suppose you could use a framing technique to frame the content under http://server.domainname.net/bigcompany - that way, the only url that they'd see would be http://server.domainname.net/bigcompany, unless, of course, they viewed the source, which would tell them where it was coming from.  An example of this would be:

http://www.lochenphoto.com 

... this user has their domain hosted on a server, but delivers the content from another server.

Probably a bit more satisfying would be to use a reverse proxy  through mod_proxy:

http://httpd.apache.org/docs-2.0/mod/mod_proxy.html

From that page:

"A reverse proxy" ... "appears to the client just like an ordinary web server. No special configuration on the client is necessary. The client makes ordinary requests for content in the name-space of the reverse proxy. The reverse proxy then decides where to send those requests, and returns the content as if it was itself the origin."

0
 
LVL 33

Expert Comment

by:humeniuk
ID: 12405139
Oops.  Sorry.  Evidently, periwinkle is also our resident gender expert as well.  My face is red.
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 12405169
lol - it's a common mistake, and not one that I get upset over - not many female software engineers, even these days.
0
 

Author Comment

by:EaglePress
ID: 12410054
Thanks...I will give that a try.  I have also proposed another option to management.  I will keep you informed.
0
 

Author Comment

by:EaglePress
ID: 12462639
Thanks for the input.  My second proposal (option) to management worked.  Here is what I did, just in case, anyone needs feedback.
Established a CNAME from our DNS to the other website name, not ip address.  Figured the registered domain name would be better in case the company ever changed ISP and received a new set of ip addresses.
Next the offiste company created a directory to host their site.
I registed a new domain name just for this and other sites that we will provide for future use.  This is the main reason for having the offsite server set up a directory instead of an actual dedicated site.
so now, if a user keys: w2.myservername.net/directoryname they will actually go to www.offsiteservername/directoryname but the url will show w2.myservername.net/directoryname.
I will split the points as all had some real good hints.  Thanks for the input.
0

Featured Post

Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

Question has a verified solution.

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

This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

610 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