QuickyPix has three modes:
Edit config.py, setting at least these settings:
# Directory tree containing pictures ALBUMS_DIR = '/path/to/pictures' # Directory to write cache files, must be writable by Apache CGI/SCGI user CACHE_DIR = '/path/to/cache' # File to write log data, must be writable by Apache CGI/SCGI user # One way to do this as root: # touch /var/log/quickypix.log; chown www-data /var/log/quickypix.log LOG_PATH = '/path/to/logfile' # An example is in html/template.html TEMPLATES_FILE = '/path/to/template.html' # An example is in html/style.css STYLE_FILE = '/path/to/style.css'
If you use admin mode, you need to set:
EDIT_ROOT = 'https://private.photo.site.example.com/' PUBLIC_ROOT = 'http://public.photo.site.example.com/'
<Directory /home/quarl/proj/quickypix>
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
# Note: the trailing slash after quickypix.cgi is significant!
ScriptAlias / /home/quarl/proj/quickypix/src/quickypix/quickypix.cgi/
lighttpd.conf:
cgi.assign = ( ".py" => "/usr/bin/python" ) url.rewrite = ( "^/(.*)$" => "/quickypix.cgi/$1" )
Create a symlink to quickypix.cgi from the server.document-root directory.
lighttpd has a problem where the CGI SCRIPT_NAME environment variable is set to a non-virtual path; i.e. it is the post-redirect path to the script. Thus, you must hardcode QuickyPix's notion of root in config.py:
root = ''
SCGI (like FastCGI) reuses the QuickyPix python process, making it much more efficient.
Arrange to have quickypix.scgi always running. On Debian you can use quickypix/src/init.d/quickypix.scgi.
SCGIMount /photos/ 127.0.0.1:4010
Create a toplevel symlink to quickypix.scgi (in server.document-root).
lighttpd.conf:
url.rewrite = ( "^/photos(.*)$" => "/quickypix.scgi/$1" )
scgi.server = ( ".scgi" =>
( "localhost" =>
(
"host" => "127.0.0.1",
"port" => 4010,
)
)
)
config.py:
root = '/photos'
You can edit these manually, or through the web interface.
| album/.title | album title |
| album/.comment | album comment |
| album/.highlight | highlighted picture (for album icon) |
| album/pic.comment | picture comment |
The included script convert_descript_ion converts 4DOS/ACDSee descript.ion files to QuickyPix comment format.
If you use EDIT mode, the following setup is recommended, for security.
Run normal-mode quickypix under a userid (e.g. photo-data-read) that can only:
Run edit-mode quickypix under a different userid (e.g. photo-data) that can only:
The init.d/quickypix-scgi script runs the scgi process under a given user id.
A small wrapper, src/wrapper/quickypix.cgi.su, is provided for running the cgi process under a user id different from httpd.