Deploying django on a 1and1 dedicated server - python

Hay, the company i work for uses a server just like this (https://order.1and1.co.uk/xml/order/ServerPremiumDualCoreXL;jsessionid=6007C323B398ACB7D9749B0386161CAE.TCpfix153b?__frame=top&_lf=Static&ordernow=true). To host our websites, the product claims it has python onboard, but how would i go about deploying a django application on this type of setup.

you have to find out if one of the supported django mode is available:
mod_wsgi, mod_fcgi, mod_python
I have not used dedicated servers, but I think you might be able to configure it according to your needs. Ask the service provider.

Related

django , node js, php website hosting and domain information

I would like to about Django, node js, and PHP hosting along with MySQL database.
how can we host them online, please suggest to me some websites for that? can I host the Django website with MySQL on GoDaddy, Bluehost or do I need to use cloud services like AWS Azure, etc?
how to set up a domain for these websites.
what is the difference in hosting the website using
can you host these website on a Cpanel and is there any other way also to host
The choice is really yours, you can install all of them on a single VPS server which
should be powerful enough to run them and you need to configure your Nginx or Apache2 to access them on a proxy level or with a different subdomains, or you can host them on separate servers, when you will get the domain you need to point it to your server(s) or create a reverse proxy which in turn will reflect another domain. Platforms like Azure provide more control over DevOps. Cpanel is just a tool that allows you to have more simple the process of hosting a web site. Some platforms like Heroku make the hosting process much more easier, you just deploy your code and its running like a charm no need to configure anything or install certificates, the only downside is that when you would want to scale your app the resources are stupid expensive at Heroku. I would prefer a VPS server over all of these, because of more control and flexibility.

Can I deploy my Django application only using nginx or Gunicorn?

I knew that for deploying a Django application we have to use a combination of uWSGI + Nginx or Nginx + Gunicorn server. Is that necessary? I have a small doubt here. Can we deploy the entire application only in Nginx or only in Gunicorn? Will, it not work? Just for an example(leaving production) can't I do that?
For a full pledge application you need both web server and app server. Web server such as nginx or apache deliver static content but app server delivers dynamic content. Major differences between a web server and app server are:
A web server accepts and fulfills requests from clients for static content (i.e., HTML pages, files, images, and videos) from a website. Web servers handle HTTP requests and responses only.
An application server exposes business logic to the clients, which generates dynamic content. It is a software framework that transforms data to provide the specialized functionality offered by a business, service, or application. Application servers enhance the interactive parts of a website that can appear differently depending on the context of the request.
To know more please follow these link:
https://www.ibm.com/cloud/learn/web-server-vs-application-server
https://www.educative.io/edpresso/web-server-vs-application-server
YES , you can. NO, you shouldn't.
If you run your app (in my case Django), on its development server. You can access it from a remote computer at its ip_address:port_number which should look something like 123.142.524.110:8000 and you can see your app at work.
You can also run Django with only gunicorn, it will still lack the web servers capabilities like sering static files efficiently or handling slow clients or DDOS handling. But it will run and that is all I can promise.
Unsure of whether Nginx can be directly tried with DJANGO app server, but I don't see why not. <<Probably someone else can attest to having successfully 'tried' it>>
I should repeat again, just coz its possible doesn't mean you should do it.

How do I host my Django app on the intranet?

I have successfully developed a Django app. The requirement is to deploy the app over an on-premise server. The application is accessible on the intranet using the development environment. Is any web server is preferred to deploy this application locally (or) should I leave the terminal running the server as it is so that the users can access the application as they are already doing it? I am using a unix server.
If the question is actually on deployment model, I suggest to take a look at django docs on deployment. Depending on load, uWSGI/Gunicorn [+ nginx] will be good choice.
Independent of tools you use, no need to leave running terminal on your server. There's a lot of tools to "daemonize" processes. Simplest would be supervisor

A list of everything I need for running my app on a web server

What I want to know are actually 2 things.
Part 1:
I have a developed source code for an application in python that uses Django framework.
What I want is to be able to run the code on a developer machine and see the result. What do I need for it?
(my guesses):
Python development enironment (Eclipse/PyDev/Aptana Studio 3 seem to be the better ones for windows not sure linux yet),
I also have a postgre database already setup (I know there's a file where I have to specify connection information)
- something installed from django or would this be already included in the code that I have?
Part II:
I also want to make a dev server accessible through internet.
- this is the major part of the question and the most important. How do I publish the app?
- I have a linux machine that I would do this on, but unsure of all the things I need. Apache server?
To answer your questions:
What you need: A list of requirements and instructions to get started with Django is available here: http://djangobook.com/en/2.0/chapter02/.
Database: that chapter also includes a section on configuring access to your database, with a specific section on postgreSQL.
Dev server: To start a basic development server, see this tutorial section
Deploying django (production): For instructions on how to deploy Django for production, see chapter on deploying Django.
Publishing on internet: as for making your dev server accessible through the internet, ask on https://serverfault.com/. Make sure you provide more information about your network setup, what you've tried, what isn't working, etc. (Briefly, you need to make sure that the host you are running your server on is on a publicly accessible IP, or has port 80 forwarded to it from such a host. If in doubt, speak to your sys/network admin if you have one. Or use a django hosting service such as those listed on http://djangohosting.com)
IDE : Regarding IDE, it's down to personal preference. What you mentioned are fine and can run on Linux too.
As a first step, I suggest you follow the tutorial which guides you through the process of starting a development server and developing a basic app.
Even if your goal is to deploy an existing app, the tutorial will give you an idea of how the different components work together (apps, models, urls, templates, etc) which will help with debugging when something goes wrong with your deployment.
Good luck.
You need Python, Django, a WSGI container (e.g. mod_wsgi, uWSGI, Paste Deploy), and a database server. You make the Django project available as a WSGI app, bound to the appropriate interface on the machine.

Is it possible to install SSL on Google app engine for iPhone application?

I am using python language for google app engine based iphone application .I want to install/access ssl on python. I am unable to find a way to install/enable it in python file. please guide me how can I make my application to connect to ssl As I want to Apple enable push notification services on my application Its urgent.
See the App Engine Python documentation on setting up secure URLs. Note that this will only work when accessed via your appspot.com domain - it's not possible to have SSL on a custom domain through App Engine, currently.
Nick Johnson has already provided a link and mentioned that this functionality is not currently available on your domain (only on apps running on Google's hotspot domain).
Obviously, most developers need their apps to run on their own domains, so this is a very highly requested feature. Fortunately, Google has recently added this feature to their GAE roadmap indicating that it will be available soon. Unfortunately, we don't know what 'soon' means.

Categories

Resources