The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

uHTML::psgi - standard psgi binding for plack

VERSION

Version 1.0

DESCRIPTION

Standard uHTML binding for plackup. It works well with FCGI.

SYNOPSIS

To use it with a webserver (e.g. nginx) a service file must be created and a appropriate system service need to be started. Here an example with systemd.

plack systemd service:

      [Unit]
      Description=Fast CGI uHTML Server
      After=network.target
      Requires=psgi.service
    
      [Service]
      User=uhtml
      Group=www
      ExecStart=/usr/bin/plackup -E deployment -s FCGI -S /var/run/psgi/uHTML -a /usr/lib/perl5/vendor_perl/5.26.1/uHTML/psgi
      WorkingDirectory=/tmp
      Restart=on-failure
    
      [Install]
      WantedBy=multi-user.target

To ensure that the directory /var/run/psgi exists another service is needed:

      [Unit]
      Description=Create psgi socket directory
    
      [Service]
      Type=oneshot
      ExecStart=/bin/bash -c 'if [[ ! -d /var/run/psgi ]] ; then mkdir /var/run/psgi ; chown uhtml.www /var/run/psgi ; chmod 770 /var/run/psgi ; fi'
    
      [Install]
      WantedBy=multi-user.target

SEE ALSO

perl(1), plack(3), plackup(1), nginx(8), systemd(1), systemd.service(5), http://www.uhtml.de

AUTHOR

Roland Mosler (Roland.Mosler@Place.Ug)

COPYRIGHT

Copyright 2009 Roland Mosler. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.