Sunday, November 22, 2009

Installing Django on Fedora Linux Apache

NB: This is a deprecated method of running django on apache. A better method can be found at http://docs.djangoproject.com

This tutorial assumes that you have webmin  installed and running. It also assumes that you know how to use su and the webmin . Check previous posts for how to install and configure webmin.

STEPS
  1. Install Apache,Django, mod-python and postgreSQL
  2. yum install apache, mod-python, django, postgresql, postgresql-server

    You can install the above via yumex too.


  3. Start Apache, PostgreSQL via the Webmin module

  4. Make the Directory where your project will be hosted
  5. mkdir /home/projects

  6. Set it as a Django path
  7. cd /home/projects
    /usr/bin/django-admin startproject mysite


  8. Edit the python.conf file
  9. su
    *backup
    cp /etc/httpd/conf.d/python.conf /etc/httpd/conf.d/python.conf.bak

    *edit
    gedit /etc/httpd/conf.d/python.conf

    *Add the following lines
    <location "/mysite/">
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE mysite.settings
    PythonDebug On
    PythonPath "['/home/projects'] + sys.path"
    </location>

    *Make sure that you have this line in your configuration and its is not commented out (#)
    LoadModule python_module modules/mod_python.so


  10. Make sure that your site is in the apache aliases . You can add this by going to webmin->servers->Apache Webserver->Default Server->Aliases and Redirects
    Add mysite (or whatever you want to call it) and set the path to /home/projects/mysite


  11. Restart apache
  12. su
    apachectl restart


  13. Go to your browser, type in localhost/mysite (or whatever you called it in the redirects)
Blogged with the Flock Browser

2 comments:

  1. apple watch stainless steel vs titanium
    Apple Watch black oxide vs titanium drill bits Stainless nipple piercing jewelry titanium Steel and Stainless Steel are made of titanium welding stainless steel with titanium steel and 2013 ford focus titanium hatchback aluminum. In both cases samsung titanium watch the watch is

    ReplyDelete
  2. One methodology for managing money is to divide your slot bankroll for the day into smaller-session bankrolls. If, for example, you have taken $100 on a two-and-a-half-hour riverboat cruise, allot $20 for each half-hour. Select 1 / 4 machine — greenback machines could devastate a $100 bankroll in minutes — and play the $20 via quickly as}. If you have received more than $20 in payouts, pocket the surplus and play with the unique $20. At the top of one half-hour, pocket no matter is left and start a new new} session with the following $20. Online slots are totally reliant on chance so unfortunately, there’s no secret strategy to assist 카지노사이트 gamers win extra.

    ReplyDelete