postgresql3.conf 5.04 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
# vim:set sw=4 ts=4 sts=4 ft=perl expandtab:
{
    ####################
    # Hypnotoad settings
    ####################
    # see http://mojolicio.us/perldoc/Mojo/Server/Hypnotoad for a full list of settings
    hypnotoad => {
        # array of IP addresses and ports you want to listen to
        listen => ['http://127.0.0.1:8080'],
        # if you use Lstu behind a reverse proxy like Nginx, you want to set proxy to 1
        # if you use Lstu directly, let it commented
        #proxy  => 1,
    },

    # put a way to contact you here and uncomment it
    # MANDATORY
    contact       => 'admin[at]example.com',

    # array of random strings used to encrypt cookies
    # optional, default is ['fdjsofjoihrei'], PLEASE, CHANGE IT
    #secret        => ['fdjsofjoihrei'],

    # secret passphrase to access some admin features
    # If you don't want to have a plain text password in configuration,
    # use hashed_adminpwd instead
    # optional, but you won't have access to admin /stats if not set and if hashed_adminpwd is not set either
    #adminpwd      => 's3cr3T',

    # secret hashed passphrase to access some admin features
    # Hash your password by issuing `echo -n s3cr3T | sha256sum` on your terminal
    # optional, but you won't have access to admin /stats if not set and if adminpwd is not set either
    hashed_adminpwd => '31f7a65e315586ac198bd798b6629ce4903d0899476d5741a9f32e2e521b6a66',

    # choose a theme. See the available themes in `themes` directory
    # optional, default is 'default'
    #theme         => 'default',

    # number of URLs to be displayed per page in /stats
    # optional, default is 10
    #page_offset   => 10,

    # length of the random URL
    # optional, default is 8
    #length            => 8,

    # how many URLs will be provisioned in a batch ?
    # optional, default is 5
    #provis_step       => 5,

    # max number of URLs to be provisioned
    # optional, default is 100
    #provisioning      => 100,

    # URL sub-directory in which you want Lstu to be accessible
    # example: you want to have Lstu under https://example.org/lstu/
    # => set prefix to '/lstu' or to '/lstu/', it doesn't matter
    # optional, defaut is /
    #prefix        => '/',

    # array of authorized domains for API calls.
    # if you want to authorize everyone to use the API: ['*']
    # optional, no domains allowed by default
    #allowed_domains   => ['http://1.example.com', 'http://2.example.com'],

    # if set, the shortened URLs will use this domain
    # optional
    #fixed_domain => 'example.org',

    # choose what database you want to use
    # valid choices are sqlite and postgresql (all lowercase)
    # optional, default is sqlite
    #dbtype => 'sqlite',

    # SQLite ONLY - only used if dbtype is set to sqlite
    # define a path to the SQLite database
    # you can define it relative to lstu directory or set an absolute path
    # remember that it has to be in a directory writable by Lstu user
    # optional, default is lstu.db
    #db_path           => 'lstu.db',

    # PostgreSQL ONLY - only used if dbtype is set to postgresql
    # these are the credentials to access the PostgreSQL database
    # mandatory if you choosed postgresql as dbtype
    pgdb => {
        database => 'lstu3',
        host     => 'localhost',
        user     => 'lstu',
        pwd      => 'lstu'
    },

    # Rate-limiting for the API
    # After ban_min_strike requests in a second, the IP address will be
    # banned for one hour.
    # If it continues to query the API during this ban time at least
    # ban_min_strike times, it will be banned for a month.
    # optional, default is 3
    #ban_min_strike    => 3,

    # define an URL to the Piwik instance and the ID of a website to track
    # set if you want to track views in Piwik
    # optional, Piwik tracking is disabled by default
    #piwik => {
    #    url    => 'http://piwik.example.com',
    #    idsite => '1',
    #},

    # use Minion instead of directly increase counters
    # need to launch a minion worker service if enabled
    # optional, Minion is disabled by default
    minion => {
        enabled => 1,
        db_path => 'minion.db'
    },

    # set `ldap` if you want that only authenticated users can shorten URLs
    # please note that everybody can still use shortend URLs
    # optional, no default
    #ldap => {
    #    uri         => 'ldaps://ldap.example.org',
    #    user_tree   => 'ou=users,dc=example,dc=org',
    #    bind_dn     => ',ou=users,dc=example,dc=org',
    #    bind_user   => 'uid=ldap_user',
    #    bind_pwd    => 'secr3t',
    #    user_filter => '!(uid=ldap_user)'
    #},

    # set `htpasswd` if you want to use an htpasswd file instead of ldap
    # create the file with `htpasswd -c lstu.passwd user`, update it with `htpasswd lstu.passwd user2`
    # make sure that lstu can read the file!
    # optional, no default
    #htpasswd => 'lstu.passwd',

    # if you've set ldap or htpasswd above, the session will last `session_duration` seconds before
    # the user needs to reauthenticate
    # optional, default is 3600
    #session_duration => 3600,
};