Simple URL redirect to port 81
Posted by: flare_chris (---.range86-150.btcentralplus.com)
Date: February 26, 2013 11:57PM

Hi all
I'm new to configuring apache, but thanks to wamp I've got Wordpress up and running on a Windows Server 2008 R2 machine.
My issue is... I've got apache running on port 80 to serve a wordpress installation, that's all fine. Prior to using WAMP I used a Domino web server on that machine. It's still there, I've shifted it to port 81. It hosts a website for me, let's call it www.mydominosite.com. Being Domino, www.mydominosite.com actually opens a page within a Domino database, so the path that brings me to the page I need is www.mydominosite.com:81/Databases/Infrastructure/mydominosite.nsf/index

Basically, I want to redirect incoming requests to [www.mydominosite.com] to www.mydominosite.com:81/Databases/Infrastructure/mydominosite.nsf/index

I've tried virtual hosts (having loaded proxy_module, proxy_http_module and rewrite_module)
<VirtualHost *>
ServerName mydominosite.com
ServerAlias *.mydominosite.com
RewriteEngine On
RewriteRule ^[www.mydominosite.com](.*) \[www.mydominosite.com]
ErrorLog "logs/mydominosite.com-error.log"
CustomLog "logs/mydominosite.com-access.log" common
</VirtualHost>

I've messed around with RewriteRule lines in the webroot .htaccess:

RewriteRule www.mydominosite.com [www.mydominosite.com]

So far all to no avail - if I go to www.mydominosite.com what I am seeing is the wordpress content front page from a completely different domainname, let's call it www.mywordpress.com

It's bound to be something simple, but I've been going round this all evening and now I need some help from you guys, take pity on me please! :-)

Options: ReplyQuote
Re: Simple URL redirect to port 81
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: February 27, 2013 12:37AM

Dont know anything about the domino server but it only took 5 mins to find this info from google and it seems quite similiar to what you are trying, logical and easy to setup.

[www.ferdychristant.com]

Is it any help

Options: ReplyQuote
Re: Simple URL redirect to port 81
Posted by: flare_chris (---.range86-150.btcentralplus.com)
Date: February 27, 2013 10:19AM

Thanks, but that was the first thing I tried, I found that ferdychristant blog too. I nicked his virtual host setup, but no joy

Options: ReplyQuote
Re: Simple URL redirect to port 81
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: February 27, 2013 12:25PM

Ok,
just that your rewrite rule does not look like his

Options: ReplyQuote
Re: Simple URL redirect to port 81
Posted by: flare_chris (---.range86-150.btcentralplus.com)
Date: March 04, 2013 12:12PM

I was able to sort this with a proxy redirect, I found it here [serverfault.com]
The jist was:

You can configure it from apache using NameVirtualHost directive and additional ProxyPass and ProxyPassReverse directives provided by mod_proxy module. Here is my configuration

NameVirtualHost *:80
<VirtualHost *:80>
ServerName mydominosite.com

ProxyPass / [www.mydominosite.com]
ProxyPassReverse / [www.mydominosite.com]
ErrorLog "logs/mydominosite.com-error.log"
CustomLog "logs/mydominosite.com-access.log" common
</VirtualHost>

<VirtualHost *:80>
ServerName www.myapachesite.com
DocumentRoot C:\wamp\www
</VirtualHost>

Options: ReplyQuote
Re: Simple URL redirect to port 81
Posted by: stevenmartin99 (Moderator)
Date: March 04, 2013 12:16PM

No

You just do it in te router

Map port 80 to 81

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote


Sorry, only registered users may post in this forum.