[plug] Apache ProxyRequests or RewriteEngine?

Shanon Loughton autobot at iinet.net.au
Wed Sep 28 14:37:26 WST 2011


Thanks tim

So there are two methods to hide the second server's url - the CNAME in the
case of a complete site, or Proxy for components of the second site?
Although probably not ideal, couldnt you proxy everything from the second
site to the first and end up with the equivalent of that of the CNAME
feature?

In any case, the CNAME solved my issue, thanks

Shanon


On Tue, Sep 27, 2011 at 8:27 AM, Tim White <weirdit at gmail.com> wrote:

>  Hi Shanon,
>
> I'm not sure if you are confused about the uses of proxyrequests and
> rewrite engine?
>
> It sounds like you have a domain somewhere (http://newexampledomain.com)
> that you want to server from your home computer? You'll need to have the DNS
> updated to point the domain to your home computer. If for example, your home
> computer is on a dynamic ip address, and you use something like dyndns to
> point a free domain to it, you can use CNAME's in DNS to point the domain to
> the home computer.
>
> i.e.
>
> newexampledomain.com CNAME myhomecomputer.freednsprovider.com
> Then you tell the apache webserver at home to listen for both domain names
> (or just the newexampledomain one if you want). When a computer accesses
> newexampledomain.com, it'll lookup the ipaddress and get the CNAME, which
> it'll then resolve to an ip address,  but will still be using the
> newexampledomain.com address.
>
> Proxy requests is mainly used when you want another server to appear as
> it's on the main server. For example:
> I have exampledomain.com hosted on 1.1.1.1, but I have another server at
> 2.2.2.2 that contains all my source code repository browser (also a web
> server). However, I want most of my web pages served from 1.1.1.1 except I
> want the 2.2.2.2 to appear like it's also on the same server. I can then use
> proxyrequests so that http://exampledomain.com/sourcecode will actually
> fetch things from the 2.2.2.2 server, not the 1.1.1.1 server. However, the
> client doesn't connect to 2.2.2.2, the 1.1.1.1 server will fetch the content
> from 2.2.2.2 and send it to the client. It's often used when for example the
> 2.2.2.2 server is in a private network and not publicly accessible.
>
> Lastly, rewriteengine is for changing what resource is actually fetched
> from the server. So your client connects to
> http://exampledomain.com/random/page/of/apples and the rewriteengine
> matches some pattern and internally rewrites the address to /myscript.php,
> and then myscript.php is responsible for serving the content based on the
> url used.
>
> I hope that all makes a bit more sense. Please try and explain exactly what
> you are trying to do (using examples of what people type in the browser, and
> where you want the content to come from).
>
> Tim
>
>
> On 27/09/11 01:11, Shanon Loughton wrote:
>
> Hi everyone
> Im trying to proxy a home server to a new domain name, and I have access to
> Cpanel and the .htaccess file, but not the Cpanel httpd.conf file.
>
> As far as I can tell I have rewriteengine available to me but I can't tell
> if "proxyrequests on" works? Im trying to mask the home url address.
>
> cheers
> Shanon
>
>
>
>
> _______________________________________________
> PLUG discussion list: plug at plug.org.auhttp://lists.plug.org.au/mailman/listinfo/plug
> Committee e-mail: committee at plug.org.au
> PLUG Membership: http://www.plug.org.au/membership
>
>
>
> _______________________________________________
> PLUG discussion list: plug at plug.org.au
> http://lists.plug.org.au/mailman/listinfo/plug
> Committee e-mail: committee at plug.org.au
> PLUG Membership: http://www.plug.org.au/membership
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20110928/70107b47/attachment.html>


More information about the plug mailing list