Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#14635 closed (invalid)

Documentation improvement on setting up django with OpenBSD

Reported by: pgurumu@… Owned by: nobody
Component: Documentation Version: 1.2
Severity: Keywords: django openbsd
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I found it really hard to configure django on OpenBSD (stock Apache). I eventually figured it out and it works and would like to add this to the documentation. I think this will be useful. This requires few changes to httpd.conf

  1. Create directory called django under /var/www/htdocs
  2. Create django project under /var/www/htdocs/django
  3. Create NEW_PROJECT.fcgi file under /var/www/htdocs/django (Name of the filename matters, because this will be used in VirtualHost)

Under VirtualHost configuration for default htdocs access
Add the following lines

<VirtualHost _default_:443>
... snip ...
RewriteEngine On
RewriteRule ^/(media.*)$ /$1 [QSA,L,PT]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/django/NEW_PROJECT/(.*)$ /django/NEW_PROJECT.fcgi/$1 [QSA,L]
... snip ...
</VirtualHost>

Enable ExecCGI options for /var/www/htdocs directory

Change History (4)

comment:1 by Gabriel Hurley, 14 years ago

To my reading, there is nothing unique to OpenBSD in the steps you've described. As far as I can tell what you've described is the particular path you used for FastCGIExternalServer (mysite.fcgi in the docs). The fact that this path should be customized is explained in the preceding section.

If I'm missing something here, or you have a suggestion for how the existing docs could make these steps more clear please give specifics. At present, I'm not seeing what's so different here that it deserves to be covered in its own right.

comment:2 by pgurumu@…, 14 years ago

Resolution: invalid
Status: newclosed

You know what, you are correct, this has to be on the OpenBSD help rather than django, (hindsight 20/20). I think django pretty much works the same way, the only wrinkle might be, there is not explanation for chroot'ed environment, but then again, this should be in covered in the OS help rather than django help. Sorry for the noise.

comment:3 by Gabriel Hurley, 14 years ago

No problem! Just wanted to make sure my understanding was correct ;-)

comment:4 by rmboggs@…, 13 years ago

Shameless plug, I know but I dealt with this awhile back and documented my process for using OpenBSD's httpd with django. Hope it helps those who need it.
http://synacks.blogspot.com/2009/01/django-on-openbsd.html

Note: See TracTickets for help on using tickets.
Back to Top