Deploy Django on Apache Server

I am new to web development. Be careful. And thanks in advance. I am developing on env windows. and deployment on a Linux server with Python 2.6.2 installed. Running apache2.2 as a virtual host, and I use mod_wsgi. I plan to serve multimedia files from the same virtual host.

I have a django site and now I'm ready to deploy. I'm stuck and every site I go to seems outdated / incomplete / overworked.

https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/

http://www.djangobook.com/en/2.0/chapter12/

... only 2 links regarding newbness

The top link seems to be what I need, but I'm still confused by this:

  • What does the file structure look like on the server
    • I cannot change / edit server files myself, I rely on dba for this
    • I have django.wsgi and django.wsgi ~ where are they going?
    • Where can I put my project regarding these wsgi files?

  • Is the httpd.conf file what is the server having on it? or create another?

  • Do I need to put django in a form or form on the server? If so, where? What about packages like registration by default?

Sorry for the novelty again, I hit my head for 2 weeks. Any help / links would be greatly appreciated if they did not connect me to django-docs. I read these ... MUCH! thanks

+6
source share
4 answers

Also read:

http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango

and watch:

http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Conference_Presentations

The latter includes Django examples and talks a bit about places, permissions, etc.

The first one is even related to the document in the Django documentation.

+3
source
  • It doesn't matter where the files go. They just need to be human readable / executable, which the web server is working with. I do not know what you mean by django.wsgi~ , it looks like a backup file created by your editor - you do not need it.

  • Yes, httpd.conf is a configuration file for Apache. Some distributions (for example, Debian and Ubuntu) break this into separate files for each site on which the server is running. If your administrator is the only one who can edit files, he will already know about it.

  • Yes, you need Django and any third-party packages.

+3
source

@Nathan

A simpler option for you while you are studying this is not a lot of cost.

I can also suggest you take a look at Heroku - allowing you to easily deploy your applications in minutes.

Until recently, they only supported RoR, and they contributed support for Django and Python - they also have very well-documented tutorials.

I hope this helps

Heroku Django / Python Tutorial

+1
source

I wrote a simple deployment guide for django applications, which can be found here . It completely depends on the configuration and deployment of the project. I also have link settings. I honestly believe that he answers all your questions, I would look at him.

Good luck.

+1
source

Source: https://habr.com/ru/post/899973/


All Articles