We’re hosting two sites and don’t have a domain name at the moment so we’re using the IP address. I want the two sites to be accessed in the following manner: http://220.127.116.11/Site1 http://18.104.22.168/Site2 Site1 is a small About us type site. Site2 is a Django-based file upload site. Here’s my httpd.conf file: WSGIPythonPath /var/www/Site2/src/site Listen 80 NameVirtualHost *:80# Site1 <VirtualHost *:80> ServerName Site1 DocumentRoot /var/www/Site1 </VirtualHost># Site2 <VirtualHost *:80> ServerName Site2 WSGIScriptAlias /Site2 /var/www/Site2/src/site/wsgi.py <Directory [...]Continue Reading »
I am using PHP with apache2 and MySQL on a rackspace server, it is unmanaged cluoud hosting. I am hosting multiple sites using virtual host. Now i want to use Django on it. A site needs django so I have installed django and mod_wsgi using apt-get install . Then I wrote following lines in my httpd.conf WSGIScriptAlias / /var/www/djangosite/pyproject/mysite/mysite/wsgi.py WSGIPythonPath /var/www/djangosite/pyproject/mysite/<Directory /var/www/djangosite/pyproject/mysite/mysite/> <Files wsgi.py> Order deny,allow Allow from all </Files> </Directory> But then only django [...]Continue Reading »
I am working on a Django project with a MySQL backend. I’m curious about the best way to update a production server’s database to reflect the changes made on the development server’s database? When I develop now, I make some changes to a models.py file, then to a schemamigration using South. Sometimes I do several migrations across several apps within the main project folder before it’s ready for the production database. This means that there [...]Continue Reading »
I am tasked with designing a server setup for a site that has to handle about 5k requests per minute (80 – 90 per second). The only constraints that I am aware of are that the site probably will be written in Django and most, if not all, of the traffic will be encrypted. Will the following server setup be enough to handle these requirements? With this being my first such serious job I would [...]Continue Reading »
I’m trying to set up LDAP authentication with my Django app using Django-Auth The basic idea I want to do is any LDAP user with “IT – Help Desk” in the description would get mapped to a certain Django group, a user with “Admin” in the description would go to another Django group, and anyone else wouldn’t be allowed in. (There are legacy reasons I have to use the description field, so that’s not an [...]Continue Reading »
I have a t1.micro instance with public dns looks similar to ec2-184-72-67-202.compute-1.amazonaws.com (some numbers changed) On this machine, I am running a django app $ sudo python manage.py runserver –settings=vlists.settings.dev Validating models…0 errors found Django version 1.4.1, using settings ‘vlists.settings.dev’ Development server is running at http://127.0.0.1:8000/ I have opened the port 8000 through AWS console Now when I hit the following in Chrome http://ec2-184-72-67-202.compute-1.amazonaws.com:8000, I get Oops! Google Chrome could not connect to WHat is [...]Continue Reading »
I’m running Django on an RHEL instance under Apache/mod_wsgi, and I’m having issues setting some environment variables for the Python process. All of the components (Apache, Python, mod_wsgi, external libraries) are built from source, not installed from the repos. The specific issue is support for Oracle support. I am able to connect to Oracle instances without a problem if I set the ORACLE_HOME and LD_LIBRARY_PATH on the command line when firing up Python myself, but [...]Continue Reading »
For a website I’m developing all my static content is hosted offsite on a combination of S3/Cloudfront. I’ve been looking over a lot of tutorials for deploying a Django app into production and a lot of them recommend a combination of Nginx (reverse proxy) + Apache. This is stated under the assumption that Ngnix will be used for serving static contents and Apache will do all the heavy lifting. Are there any other reasons to [...]Continue Reading »
I’m running several django sites on uwsgi, and I’m attempting to optimise my configuration for memory usage, but the –idle and –die-on-idle flags don’t seem to be doing anything. Each daemon starts off at around 10-12MB and increases to around 30MB once it has served a request, but then stays there even when idle for some time. My startup command is: uwsgi –cheap –idle 60 –die-on-idle –http :8083 –wsgi-file /var/django/mysite/apache/django.wsgi Is there anything I’m missing [...]Continue Reading »
I am trying to get django running on an ubuntu 12.04 release using postgres (clean install). To get it running it used to be that you would have to edit the /etc/postgresql/9.1/main/pg_hba.conf file. However when I look at this release there is no /etc/postgresql directory only /etc/postgresql-common and there doesn’t appear to be a file that resembles pg_hba.conf under that directory. Additionally while I have you ear this is the change I wanted to make: [...]Continue Reading »
- Cron expression that runs every 5 minutes from 1:30 am – 6:00 am [duplicate]
- Understanding redundant power supplies
- Is there a way for administrators to disable users from installing Firefox extensions?
- Is there research material on NTP accuracy available?
- How to create a limited “domain admin” that does not have access to domain controllers?