diff options
author | James An | 2015-11-17 12:31:33 -0500 |
---|---|---|
committer | James An | 2015-11-17 12:31:33 -0500 |
commit | 267671ec6902f2100c786d6b1b0d9ca89772c6b1 (patch) | |
tree | 482b655d734d708cec9bc9c617d82987f0b34ac9 | |
download | aur-267671ec6902f2100c786d6b1b0d9ca89772c6b1.tar.gz |
Initial commit.
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | PKGBUILD | 43 | ||||
-rw-r--r-- | nginx.conf | 66 |
3 files changed, 131 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c146a81266ac --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = pimpmylog-git + pkgdesc = Log viewer for your web server (formerly the PHP Apache Log Viewer) + pkgver = 1.7.9.r0.g22f448c + pkgrel = 1 + url = http://pimpmylog.com + arch = any + license = GPL3 + makedepends = git + depends = php>=5.2 + optdepends = apache: compatible web server + optdepends = nginx: compatible web server + optdepends = lighttpd: compatible web server + optdepends = darkhttpd: compatible web server + provides = pimpmylog=1.7.9.r0.g22f448c + conflicts = pimpmylog + source = pimpmylog::git+https://github.com/potsky/PimpMyLog.git + source = nginx.conf + md5sums = SKIP + md5sums = 78ee0cca1e8da50b0064648ed125bbd8 + +pkgname = pimpmylog-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..78a9f30c5a1e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: James An <james@jamesan.ca> + +_pkgname=PimpMyLog +pkgname="${_pkgname,,}-git" +pkgver=1.7.9.r0.g22f448c +pkgrel=1 +pkgdesc="Log viewer for your web server (formerly the PHP Apache Log Viewer)" +arch=('any') +url="http://pimpmylog.com" +license=('GPL3') +depends=('php>=5.2') +optdepends=('apache: compatible web server' + 'nginx: compatible web server' + 'lighttpd: compatible web server' + 'darkhttpd: compatible web server') +makedepends=('git') +provides=("${_pkgname,,}=$pkgver") +conflicts=("${_pkgname,,}") +options=() +install= +source=("${_pkgname,,}"::"git+https://github.com/potsky/$_pkgname.git" + 'nginx.conf') +md5sums=('SKIP' + '78ee0cca1e8da50b0064648ed125bbd8') + +pkgver() { + cd "${_pkgname,,}" + ( + set -o pipefail + git describe --long --tag | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) +} + +package() { + cd "${_pkgname,,}" + + install -m755 -d "$pkgdir/usr/share/webapps/${_pkgname,,}" + cp -a * "$pkgdir/usr/share/webapps/${_pkgname,,}/" + + install -Dm644 README.md "$pkgdir/usr/share/doc/${_pkgname,,}/README.md" + install -Dm644 ../nginx.conf "$pkgdir/etc/nginx/conf.d/${_pkgname,,}.conf" +} diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 000000000000..b5be47ba361c --- /dev/null +++ b/nginx.conf @@ -0,0 +1,66 @@ +# pimpmylog.conf +# nginx config include for a local virtual host for PimpMyLog + +# Copyright 2014 James An + +# THIS PROGRAM is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +server { + access_log /var/log/nginx/pimpmylog.access.log; + error_log /var/log/nginx/pimpmylog.error.log; + + include fastcgi_params; + fastcgi_param MAIN_SITE_NAME pimpmylog.lacolhost.com; + set $main_site_name "pimpmylog.lacolhost.com"; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + listen *:80; + server_name pimpmylog.lacolhost.com; + root /usr/share/webapps/pimpmylog; + + location ~* \.php$ { + add_header X-Speed-Cache "$upstream_cache_status"; + add_header X-Speed-Cache-UID "$cache_uid"; + add_header X-Speed-Cache-Key "$key_uri"; + add_header X-NoCache "$nocache_details"; + add_header X-This-Proto "$http_x_forwarded_proto"; + add_header X-Server-Name "$main_site_name"; + add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"; + tcp_nopush off; + keepalive_requests 0; + try_files $uri =404; ### check for existence of php file first + fastcgi_pass 127.0.0.1:9000; + ### + ### Use Nginx cache for all visitors. + ### + set $nocache ""; + if ( $nocache_details ~ (?:AegirCookie|Args|Skip) ) { + set $nocache "NoCache"; + } + fastcgi_cache speed; + fastcgi_cache_methods GET HEAD; ### Nginx default, but added for clarity + fastcgi_cache_min_uses 1; + fastcgi_cache_key "$is_bot$device$host$request_method$key_uri$cache_uid$http_x_forwarded_proto$sent_http_x_local_proto$cookie_respimg"; + fastcgi_cache_valid 200 10s; + fastcgi_cache_valid 302 1m; + fastcgi_cache_valid 301 403 404 5s; + fastcgi_cache_valid 500 502 503 504 1s; + fastcgi_ignore_headers Cache-Control Expires; + fastcgi_pass_header Set-Cookie; + fastcgi_pass_header X-Accel-Expires; + fastcgi_pass_header X-Accel-Redirect; + fastcgi_no_cache $cookie_NoCacheID $http_authorization $http_pragma $nocache; + fastcgi_cache_bypass $cookie_NoCacheID $http_authorization $http_pragma $nocache; + fastcgi_cache_use_stale error http_500 http_503 invalid_header timeout updating; + } +} |