Solved

URL forwarding

Posted on 2004-10-05
17
1,316 Views
Last Modified: 2008-01-09
I have an Apache web server which has a small website on it, http://www.mysite.com. I want to be able to access another machine externally for access to Citrix nFuse. Does anyone know how to (or is there a way to) tell Apache to forward requests to http://www.mysite.com/citrix which is running on another box? The other box is running Windows Server 2003  & IIS 6.

Any help would be greatly appreciated.

Max
0
Comment
Question by:mxfuk
[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
  • 7
  • 6
  • 2
  • +1
17 Comments
 
LVL 15

Expert Comment

by:periwinkle
ID: 12227323
Why not set up a subdomain, called citrix.mysite.com that is the name of the second box?  That would be the easiest solution...
0
 

Author Comment

by:mxfuk
ID: 12227588
Ok, but how would I get to that box, by putting citrix.mysite.com into a web browser would that not go to www.mysite.com? What do I have to tell to get citrix.mysite.com? Many thanks
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 12227895
you'd have to set up a separate A record for citrix.mysite.com to go to the second server, whereas www.mysite.com uses a separate A record to go to the first server.  
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 4

Expert Comment

by:TomDavidson
ID: 12227899
You would need to set an additional "A" record in the dns zone for mysite.com to point to the IP address of your windows server
0
 

Author Comment

by:mxfuk
ID: 12227957
Ah okay I can do that, my primary DNS is currently hosted offsite, would I have to host DNS myself to get this to work?

Thanks
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 12228213
no - you can use DNS servers that are offsite - they just have to point the A record to the IP address of your second server for citrix.mysite.com.
0
 

Author Comment

by:mxfuk
ID: 12228272
Ah, I only have one IP address, is it still possible or will I have to get another IP?
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 12228576
If you have a second machine, you must have a second IP address?  Is the second machine accessible from other machines on the internet?
0
 

Author Comment

by:mxfuk
ID: 12229986
Yes but behind a router using NAT so it is a private IP.
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 12231238
You would need some way of routing the requests internally - unfortunately, this setup isn't my expertise.  Perhaps someone else will chime in?
0
 
LVL 4

Expert Comment

by:TomDavidson
ID: 12232877
You could proxy incoming requests to that domain with apache (so it comes into your main server and subrequests to your windows server) but I'm not totally sure how to configure that. I would look at the documentation for mod_proxy.
0
 

Author Comment

by:mxfuk
ID: 12235230
Okay thank you all for your help. I'll let you know how I get on!
0
 
LVL 15

Accepted Solution

by:
samri earned 250 total points
ID: 12239799
hi Max,

TomDavidson and periwinkle are on the right track.  Combined both DNS, and proxy stuff would get you a working solution.

Briefly, there is two options that you could opt for:

1. http://citrix.mysite.com/
2. http://www.mysite.com/citrix/

* assume that you have configured DNS to have citrix.mysite.com and www.mysite.com to point to the same IP address (A record or CNAME should work).  And both would be pointing to your public-ip address of the DSL router. Let say this is 200.200.200.200 (apology if somebody may be using this network).

You would need to configure the router to NAT-IN (or forward the traffic) on port 80 (or whatever port you wish to use). To your internal apache box  -- let say this is 192.168.1.1

And the machine running IIS6 is 192.168.1.100

On apache - this depens on which option you take.
Both would need mod_proxy to be loaded: http://httpd.apache.org/docs-2.0/mod/mod_proxy.html
Pay extra attention to ReverseProxy concept : http://httpd.apache.org/docs-2.0/mod/mod_proxy.html#forwardreverse
Examples : http://httpd.apache.org/docs-2.0/mod/mod_proxy.html#examples

Option#1 - you would need to configure apache for VirtualHosting (http://httpd.apache.org/docs-2.0/vhosts/)
-- simple config (more examples http://httpd.apache.org/docs-2.0/vhosts/examples.html)

NameVirtualHost *
<VirtualHost *>
  Servername www.mysite.com
  ...
</VirtualHost>
 
<VirtualHost *>
  ServerName citrix.mysite.com
  ProxyRequests Off

  <Proxy *>
    Order deny,allow
    Allow from all
  </Proxy>
  ProxyPass            /                 http://192.168.1.100/
  ProxyPassReverse /                http://192.168.1.100/
</VirtualHost>

Option #2 : This is to assume that you do not have any Vhost configured.  Just add the proxy directive to the main server config.
--------
  ProxyRequests Off

  <Proxy *>
    Order deny,allow
    Allow from all
  </Proxy>
  ProxyPass            /citrix                 http://192.168.1.100/
  ProxyPassReverse /citrix                http://192.168.1.100/
------

HTH
0
 

Author Comment

by:mxfuk
ID: 12242003
samri,

Thank you so much, you've put me on the right track. Just need to get the mod_proxy module installed and I'm away.

Thanks again

Max
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 12242466
Good work, Samri - I'm going to bookmark this one!
0
 
LVL 15

Expert Comment

by:samri
ID: 12247091
not a problem all! -- I just elaborated on the earlier comments :)

periwinkle:  you could alway do a search (and even the advance search).  The search feature had improved a lot.
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 12247773
samri - yes, I use the search often.  I love the bookmark feature, though, for threads where I want to remember something - this is one of those :)
0

Featured Post

Save the day with this special offer from ATEN!

Save 30% on the CV211 using promo code EXPERTS30 now through April 30th. The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
local dns 2 177
PHP Upload using Uploadify 4 116
Enabling compression in WARP Framework template 5 95
New OSQA server has a ton of fake users 4 78
Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

749 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