kevk3v Posted August 7, 2010 Share Posted August 7, 2010 Sorry if this is the wrong section guys please move it to the correct place if this is not the correct place to ask. I am trying to make a website run on a non-standard port. Example by default mysite.com should have a port number of 80, so it runs on http://mysite.com:80 how do i make it run on any other port number such as 8080, 9055, 8090 or what ever non standard port i want? I have seen this on many websites before so it is possible. Please reply asap. Quote Link to comment https://forums.phpfreaks.com/topic/210044-how-to-make-my-website-run-on-a-non-standard-port/ Share on other sites More sharing options...
zq29 Posted August 7, 2010 Share Posted August 7, 2010 You need to configure your VirtualHost to listen on a different port. Quote Link to comment https://forums.phpfreaks.com/topic/210044-how-to-make-my-website-run-on-a-non-standard-port/#findComment-1096221 Share on other sites More sharing options...
kevk3v Posted August 7, 2010 Author Share Posted August 7, 2010 Can you tell me how to do this on a host like byethost32.com, 000webhost.com or if i cant do it like that, the correct way? thanks... Quote Link to comment https://forums.phpfreaks.com/topic/210044-how-to-make-my-website-run-on-a-non-standard-port/#findComment-1096325 Share on other sites More sharing options...
Mchl Posted August 7, 2010 Share Posted August 7, 2010 First of all you should ask your host if they even allow for such changes. It might be, that they block all ports except 80 and 443 on their firewall. Quote Link to comment https://forums.phpfreaks.com/topic/210044-how-to-make-my-website-run-on-a-non-standard-port/#findComment-1096339 Share on other sites More sharing options...
Daniel0 Posted August 8, 2010 Share Posted August 8, 2010 Can you tell me how to do this on a host like byethost32.com, 000webhost.com or if i cant do it like that, the correct way? thanks... You'll need a dedicated server or a VPS. No shared host is going configure their web servers to listen on multiple ports for individual customers. Quote Link to comment https://forums.phpfreaks.com/topic/210044-how-to-make-my-website-run-on-a-non-standard-port/#findComment-1096715 Share on other sites More sharing options...
phil88 Posted August 8, 2010 Share Posted August 8, 2010 Out of curiosity, why do you want it to listen on a different port? Quote Link to comment https://forums.phpfreaks.com/topic/210044-how-to-make-my-website-run-on-a-non-standard-port/#findComment-1096763 Share on other sites More sharing options...
The Little Guy Posted August 10, 2010 Share Posted August 10, 2010 All you have to do is change the apache configuration file. From this: Listen 80 To this: Listen xxxx (replace xxxx with your port) Next you need to restart apache, and then you can go to your site: http://mysite.com:xxxx Quote Link to comment https://forums.phpfreaks.com/topic/210044-how-to-make-my-website-run-on-a-non-standard-port/#findComment-1097320 Share on other sites More sharing options...
gizmola Posted August 10, 2010 Share Posted August 10, 2010 In the apache config there is going to be a NameVirtualHost *:80 or similar statement. The vhost section then references this: servername foo.bar ... Typically there's one or 2 NameVirtualHost statements and a whole slew of vhosts that will be using that same ip/port combination. So if you wanted to have a Vhost on another port, you'd need a NameVirtualHost statement like: NameVirtualHost *:8080 This could also be used to bind to a particular IP/Port NameVirtualHost 10.1.1.10:8080 Regardless, you use the appropriate vhost directive, for example with the (all ips on machine, listen on port 8080: servername host Quote Link to comment https://forums.phpfreaks.com/topic/210044-how-to-make-my-website-run-on-a-non-standard-port/#findComment-1097329 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.