Hpw do I make a program run on a Port?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
William
Forum Contributor
Posts: 332
Joined: Sat Oct 25, 2003 4:03 am
Location: New York City

Hpw do I make a program run on a Port?

Post by William »

I have seen lots of admin panels and gaming panels and just plain sites that run on a port. I want to make it so if you type: Http://www.Domain.ext:72906 or w/e it will show me a website, A panel, Anything. Like.... If you go there it says Welcome to my website or somthing. Any ideas?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

simple.. alter your httpd.conf listen directive :)
User avatar
William
Forum Contributor
Posts: 332
Joined: Sat Oct 25, 2003 4:03 am
Location: New York City

Post by William »

Only way? Isn't it possible to let PHP do it or .htaccess? So if I make program people can download it instead of Have to download it and alter files?
User avatar
William
Forum Contributor
Posts: 332
Joined: Sat Oct 25, 2003 4:03 am
Location: New York City

Post by William »

I dont want to change the :80 port, I meen just a website. Like.. I upload... test folder into /www/, and then I type: domain.ext:97792 or w/e and it does to that test follder. not redirect but shows info. Like cPanel has it. And other cool stuff.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

php can do it too, however you'd require the ability to run the script indefinitely, which a lot of hosts do not allow.

the Listen, Port, and BindAddress directives are server configuration level only.
User avatar
William
Forum Contributor
Posts: 332
Joined: Sat Oct 25, 2003 4:03 am
Location: New York City

Post by William »

ok, thx
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

There's also the VirtualHost option, which I forgot about..
Post Reply