Sign in to follow this  
PhlashStudios

[web] Python Network Programming

Recommended Posts

Hey everyone, I am using python and i had a quick question. Lets say I set up a simple python server on port 80 using twisted thats asynchronious and what not and could be seen by a web browser. Then lets say I bought a domain name, www.example.com, how would I get my server to serve this domain name?

Share this post


Link to post
Share on other sites
Ok, this isn't really a Python question, so I'll answer and then move it to the Web forum where you'll probably get even better answers.

You have 2 choices:

1) Make the domain redirect to your computer. For this, you will probably either need a fixed IP address, which may cost you extra from your provider, or you'll have to configure it to match your new IP address every time it changes. Most providers offer a redirect-only service, but it's up to you to keep the redirect up to date.

Alternatively, you can use one of the dynamic dns services available online that notes your new address every time it changes and directs viewers there accordingly. However you usually use a subdomain of their domain, not your own domain name.

You may find out that your current internet service provider doesn't even allow incoming connections to web servers, or that even if it does, that it's against your terms of service. Worth looking out for.

2) Make the domain point to a proper web server, which has Python hosting on it. Typically you pay someone to host this for you, and all you do is connect to it (typically via FTP and Telnet) to upload your software and start it running. This is not necessarily an easy service to find since Python is not a commonly-used web serving language.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this