Basic configuration for running under Apache

65 views
Skip to first unread message

bob gailer

unread,
Nov 14, 2016, 2:36:44 PM11/14/16
to Django Users
https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/modwsgi/

This page offers:

WSGIScriptAlias //path/to/mysite.com/mysite/wsgi.py
WSGIPythonPath /path/to/mysite.com

<Directory /path/to/mysite.com/mysite>

In my setup this becomes c:\Users\myname\mysite\mysite\wsgi.py

I am puzzled by the .com in the example. Can you explain?

Tim Graham

unread,
Nov 15, 2016, 8:45:44 AM11/15/16
to Django users
I think it's just an example directory name. You can use whatever names you like.

Antonis Christofides

unread,
Nov 15, 2016, 1:49:08 PM11/15/16
to django-users
The author of that snippet decided that the root directory of the Django project is named "mysite.com", whereas the Django project itself is "mysite". While this is plausible, it is suboptimal as an example because usually the root directory of the Django project has the same name as the Django project itself ("django-admin startproject" creates it this way).

So you can perfectly read it as //path/to/mysite/mysite/wsgi.py etc.

--
Antonis Christofides
http://djangodeployment.com/
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c9f26e89-87f9-5ba8-d708-6ceb236a8e5e%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.


Ricardo Prado

unread,
Nov 16, 2016, 4:12:14 AM11/16/16
to Django users
sample configuration

WSGIDaemonProcess framework python-path=/mnt/g/Python/osvaldo/framework/:/mnt/g/Python/osvaldo/framework/lib/python2.7/site-packages
WSGIProcessGroup framework
WSGIScriptAlias / /mnt/g/Python/osvaldo/framework/framework/wsgi.py

<VirtualHost *:80>
        ServerName 127.0.0.2
        ServerAlias ahora.local
   #DocumentRoot /mnt/g/Python
   #ErrorLog /mnt/g/Python/logs/error.log
   #CustomLog /mnt/g/Python/logs/access.log combined

    Alias /static /mnt/g/Python/osvaldo/framework/static
    Alias /media /mnt/g/Python/osvaldo/framework/media

    <Directory /mnt/g/Python/osvaldo/framework>
        <Files wsgi.py>
            Require all granted
        </Files>
    </Directory>


    <Directory /mnt/g/Python/osvaldo/framework/media/>
    Require all granted
    </Directory>

    <Directory /mnt/g/Python/osvaldo/framework/static/>
    Require all granted
    </Directory>

</VirtualHost>

bob gailer

unread,
Nov 18, 2016, 8:58:41 AM11/18/16
to Django Users
Goal: run django under apache on windows 10. I have tried many things,
none of which have worked. Errror messages up to wazoo. Google has not
been my friend: I found a lot of articles Everything I read is either
oriented to linux and/or assumes knowledge I don't have.

Example: today I discovered
https://docs.djangoproject.com/en/1.10/topics/install/. There is a
section titled "Install Apache and mod_wsgi". Unfortunately it does not
tell us how to install either!

Do you know the best, proper, user-friendly, successful way to get
django running under apache on windows 10?

Daniel Roseman

unread,
Nov 18, 2016, 9:24:25 AM11/18/16
to Django users
How can you have error messages from running Django under Apache if you haven't even managed to install Apache yet? 

But the full documentation on setting this up is at https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/modwsgi/.
--
DR.
Reply all
Reply to author
Forward
0 new messages