Results 1 to 5 of 5
How do I have to configure my apache2 server, if I want to do the following:
https://hula.location.ath.cx -> https://location.ath.cx:8443
or
http://emule.location.ath.cx -> https://location.ath.cx:4711
the first URL should be forwarded to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-19-2005 #1Just Joined!
- Join Date
- Sep 2005
- Location
- Switzerland
- Posts
- 5
How to do that with apache2: https://hula.location.ath.cx -> https://location.ath.cx:8443
How do I have to configure my apache2 server, if I want to do the following:
https://hula.location.ath.cx -> https://location.ath.cx:8443
or
http://emule.location.ath.cx -> https://location.ath.cx:4711
the first URL should be forwarded to the second, but everything has to run over port 443 or 80 to my apache server and he would forward it to the specified port.
Thanks
- 09-19-2005 #2Linux Newbie
- Join Date
- Nov 2004
- Posts
- 127
It seems like an odd thing to so since port 80 is the standard port, and for what you want to do you'd need the webserver operating normally on port 80 and you'd also need it running on the other ports.
From the sounds of things you already have that going and all you want to know is how to forward? If that's the case I've always just done it with a .htaccess file in the root of the webserver. Just lookup forwarding with htaccess files, if you need more of an explination of how to do it.
Here's an example .htaccess file
This one forces them to use https, but the concept is the same. Just change the RewriteRule to where you want them sent.Code:RewriteEngine On RewriteCond %{SERVER_PORT} !=443 RewriteRule ^ https://yourdomain.tld%{REQUEST_URI} [NS,R,L]
- 09-20-2005 #3Just Joined!
- Join Date
- Sep 2005
- Location
- Switzerland
- Posts
- 5
I've tried this:
Now, the page get forwarded to the descript destination. And the connection is created from Port X -> 4711. But my real problem isn't solved yet. I need a connection from PortX (university pc) -> 443 (apache) internally forwarded to port 4711 (emule).Code:RewriteEngine On RewriteCond %{HTTP_HOST} =emule.location.ath.cx RewriteRule ^ http://location.ath.cx:4711%{REQUEST_URI} [NS,R,L] RewriteCond %{HTTP_HOST} =hula.location.ath.cx RewriteRule ^ https://location.ath.cx:8443%{REQUEST_URI} [NS,R,L]
emule and hula has their own webserver, listening on different ports. Apache is running on 80 and 443 on location.ath.cx. To access hula and emule from my university, I need to go through port 443, because all others are blocked.
Perhaps I could use the proxy module?
- 09-21-2005 #4Linux Newbie
- Join Date
- Nov 2004
- Posts
- 127
I'm not sure I really understand you. Are you saying you want all incoming connections on port 443 to come in locally on port 4711? If so why arn't you simply using port forwarding on a router?
- 09-22-2005 #5Just Joined!
- Join Date
- Sep 2005
- Location
- Switzerland
- Posts
- 5
No, you really didn't understand me right. The situation looks like that:
[Uni PC] --> [Uni Firewall] --> Internet --> [myfirewall/portforwading(443)] --> [myserver/apache(443)] --> [hula(8443) or emule(4711)]
Ok, the problem is, that my university has blocked all outgoing ports execpt 443. So if I want to connect my hula on port 8443, I've to establish a connection over port 443 to my apache webserver and he should forward it to port 8443 if he detect an access on the subdomain hula.location.ath.cx
I hope it's clear now.


Reply With Quote
