Your web applications should run as system users with limited privileges.Ĭreate a user for your app, named hello and assigned to a system group called webapps. If the application has limited access to resources on your server, potential damage can also be limited. :~$ createdb -owner hello_django helloĮven though Django has a pretty good security track record, web applications can become compromised. Shall the new role be allowed to create more new roles? (y/n) n Shall the new role be allowed to create databases? (y/n) n Shall the new role be a superuser? (y/n) n To install PostgreSQL on a Debian-based system run this command: $ sudo aptitude install postgresql postgresql-contribĬreate a database user and a new database for the app. Let’s get started by making sure our system is up to date. In this text, I pretend your domain is Update your system I’m also assuming you configured your DNS to point a domain at the server’s IP. If you click through this link when signing up, you’ll pay a bit of my server bill :) If you don’t have a server to play with, I would recommend the inexpensive VPS servers offered by Digital Ocean. If you’re using an RPM-based distro (such as CentOS), you will need to replace the aptitude commands by their yum counterparts and if you’re using FreeBSD you can install the components from ports. I am using a server running Debian 7, so everything here should also work on an Ubuntu server or other Debian-based distribution. ![]() I assume you have a server available on which you have root privileges. In this text I will explain how to combine all of these components into a Django server running on Linux. The art of running Django advanced and these days the recommended configuration is more efficient and resilient, but also more complex and includes such tools as: Nginx, Gunicorn, virtualenv, supervisord and PostgreSQL. When Django initially gained popularity, the recommended setup for running Django applications was based around Apache with mod_wsgi. ![]() Django is an efficient, versatile and dynamically evolving web application development framework.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |