-
Notifications
You must be signed in to change notification settings - Fork 0
yeupou/calaboose.transit
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
# # FILE DISCONTINUED HERE # UPDATED VERSION AT # https://gitlab.com/yeupou/calaboose.transit/raw/master/README # # | | # \_V_// # \/=|=\/ # [=v=] # __\___/_____ # /..[ _____ ] # /_ [ [ M /] ] # /../.[ [ M /@] ] # <-->[_[ [M /@/] ] # /../ [.[ [ /@/ ] ] # _________________]\ /__/ [_[ [/@/ C] ] # <_________________>>0---] [=\ \@/ C / / # ___ ___ ]/000o /__\ \ C / / # \ / /....\ \_/ / # ....\||/.... [___/=\___/ # . . . . [...] [...] # . .. . [___/ \___] # . 0 .. 0 . <---> <---> # /\/\. . . ./\/\ [..] [..] # PURPOSE ======= The point here is to provide a user with valid password, sent by mail, whenever he fails to access a directory with nginx, in order to access it. For instance, the user would like to print some crap residing on his computer from a cybercafé. Yes, packet sniffing may enable some weirdo to be nasty. GPG signing is not an option, as it's unlikely the user got his private key in the cybercafé . I don't think it would be worth it anyway. The provided password will be valid for only 60 minutes. Obviously no other mail will be sent during this hour, to avoid to being spam. CONTAINS ======== - one perl script supposed to run nginx error 401 for the given directory, send mail and will update the relevant htpasswd accordingly - one cronfile to empty the htpasswd when invalidated - one nginx configuration example (to be edited) INSTALL ======= 1) It assumes your nginx supports perl like in http://nginxlibrary.com/perl-fastcgi/: apt-get install nginx libfcgi-perl wget wget http://nginxlibrary.com/downloads/perl-fcgi/fastcgi-wrapper -O /usr/bin/fastcgi-wrapper.pl wget http://nginxlibrary.com/downloads/perl-fcgi/perl-fcgi -O /etc/init.d/perl-fcgi chmod +x /usr/bin/fastcgi-wrapper.pl chmod +x /etc/init.d/perl-fcgi update-rc.d perl-fcgi defaults insserv perl-fcgi 2) Copy and edit the nginx sample and crontab sample into the appropriate places: - something like /etc/nginx/site-available symlinked to /etc/nginx/site-enabled - /etc/cron.d/transit 3) Then you must create a group named transit and add to it users that are entitled to use this. 4) You must also make sure nginx (www-data?) can write to the directory where you store the .passwd file. In the default case here, it's /etc/nginx/passwd/
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published