View previous topic :: View next topic |
Author |
Message |
SlimShady -
Joined: 27 Sep 2005 Posts: 2
|
Posted: Tue Sep 27, 2005 11:49 am Post subject: Assign port to folder |
|
|
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 |
|
 |
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Tue Sep 27, 2005 12:00 pm Post subject: |
|
|
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 |
 |
 |
cmxflash -
Joined: 11 Dec 2004 Posts: 872
|
Posted: Tue Sep 27, 2005 1:12 pm Post subject: |
|
|
Newbie...
<?php
readfile("http://somehost.com:1234/somepage.php");
?> |
|
Back to top |
|
 |
SlimShady -
Joined: 27 Sep 2005 Posts: 2
|
Posted: Tue Sep 27, 2005 2:56 pm Post subject: |
|
|
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 |
|
 |
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Tue Sep 27, 2005 4:51 pm Post subject: |
|
|
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 |
 |
 |
cmxflash -
Joined: 11 Dec 2004 Posts: 872
|
Posted: Tue Sep 27, 2005 4:58 pm Post subject: |
|
|
Yes, loading from 127.0.0.1 will work, that means the server will load from itself (localhost). |
|
Back to top |
|
 |
|