CNAME for a directory

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.
EaglePressAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

humeniukCommented:
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
EaglePressAuthor Commented:
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
humeniukCommented:
"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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

periwinkleCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
humeniukCommented:
Oops.  Sorry.  Evidently, periwinkle is also our resident gender expert as well.  My face is red.
0
periwinkleCommented:
lol - it's a common mistake, and not one that I get upset over - not many female software engineers, even these days.
0
EaglePressAuthor Commented:
Thanks...I will give that a try.  I have also proposed another option to management.  I will keep you informed.
0
EaglePressAuthor Commented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.