Assign port to folder

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
SlimShady
-


Joined: 27 Sep 2005
Posts: 2

PostPosted: Tue Sep 27, 2005 11:49 am    Post subject: Assign port to folder Reply with quote

Hi,

I would like to assign a port to a folder.
Example situation:
IP: 123.456.789.111
Hostname: www.mydomain.com
Would like to access http://www.mydomain.com:5500 by using www.mydomain.com/port2dir.
Would that be possible with Abyss? If not, do you know a(nother) way to do this?
Thanks in advance.
Back to top View user's profile Send private message
MonkeyNation
-


Joined: 05 Feb 2005
Posts: 921
Location: Cardiff

PostPosted: Tue Sep 27, 2005 12:00 pm    Post subject: Reply with quote

Not without making something to stand in the way there and get the infomation and output it itself.
A cgi or script in some language to access localhost:5500 (Or whatever.) and output the result possibly.
No other way really.

I would do that or put a redirction on /port2dir/(.*?) to HTTP_HOST:5500/\\1. (Not physically in the colsole, though. (Although i'd love regular expressions there.))
_________________
Back to top View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger ICQ Number
cmxflash
-


Joined: 11 Dec 2004
Posts: 872

PostPosted: Tue Sep 27, 2005 1:12 pm    Post subject: Reply with quote

Newbie...
<?php
readfile("http://somehost.com:1234/somepage.php");
?>
Back to top View user's profile Send private message
SlimShady
-


Joined: 27 Sep 2005
Posts: 2

PostPosted: Tue Sep 27, 2005 2:56 pm    Post subject: Reply with quote

Thank you.
cmxflash wrote:
Newbie...
<?php
readfile("http://somehost.com:1234/somepage.php");
?>

Will the following work?
Code:
<?php
readfile("http://127.0.0.1:1234");
?>

Do I have to change the local address to the WAN IP or public domain name, or can I leave it this way?
Should I specify a specific file or would the above work?
Back to top View user's profile Send private message
MonkeyNation
-


Joined: 05 Feb 2005
Posts: 921
Location: Cardiff

PostPosted: Tue Sep 27, 2005 4:51 pm    Post subject: Reply with quote

cmxflash wrote:
Newbie...
<?php
readfile("http://somehost.com:1234/somepage.php");
?>


Thats the kind of thing I meant, however there are several solutions, and readfile can only use GET so it has drawbacks. (Wether you were calling me a newbie I don't know.)

SlimShady wrote:
Should I specify a specific file or would the above work?


You should specify addresses from the servers point of view.
_________________
Back to top View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger ICQ Number
cmxflash
-


Joined: 11 Dec 2004
Posts: 872

PostPosted: Tue Sep 27, 2005 4:58 pm    Post subject: Reply with quote

Yes, loading from 127.0.0.1 will work, that means the server will load from itself (localhost).
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group