Here a example how to setup
PyLucid using apache + mod_rewite +
fastCGI.
Note: All guides used the same directory structure.
We create a "page instance" in /var/www/YourSite and use the
PyLucid installation from /home/FooBar/PyLucid_env/.
Copy
fastCGI dispatcher and .htaccess files:
Please edit /var/www/YourSite/.htaccess: In some cases you must activate the suitable AddHandler line.
make .fcgi file executable:
You must change the path to your created environment in the .fcgi dispatcher file. Edit /var/www/YourSite/index.fcgi and change this part:
Copy
PyLucid and
django static media files:
more info: about static media files
copy 'manage.py' into your page instance:
edit the file /var/www/YourSite/manage.py and change the ROOT_DIR to /home/FooBar/PyLucid_env/
To set own settings variable, you should create:
- /var/www/YourSite/local_settings.py
You must set this into your local_settings.py:
Note:
- This two path are in default .htaccess in the mod rewrite exception list.
- You will get JS errors, if
pylucid media files can't be loaded.
(see also: a complete local_settings.py example)
To create all database tables run syncdb:
You must get something like this output:
Installing json fixture 'pylucid' from 'PyLucid_env/src/pylucid/pylucid_project/apps/pylucid_admin/fixtures'.
Installed 159 object(s) from 1 fixture(s)
If you didn't see similar output, something went wrong!
Goto:
-
Django admin site / Sites / Sites
change the "example.com" to your domain name.
Select from menu these links:
A complete example can you found in /scripts/fcgi_scripts/default.htaccess
You must change the path to
virtualenv in the line with "VIRTUALENV_FILE".
minimal .htaccess example: