Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add apache log bits and a2ensite of package.

  • Loading branch information...
commit 0b3b5be5ba4742d5ef7c9e5bd38d7f44784e7aa3 1 parent 82fad3d
@gphat authored
Showing with 12 additions and 5 deletions.
  1. +9 −4 README.mkdn
  2. +3 −1 lib/Dist/Zilla/Plugin/Dpkg/PerlbrewStarman.pm
View
13 README.mkdn
@@ -4,7 +4,7 @@ Dist::Zilla::Plugin::Dpkg::PerlbrewStarman - Generate dpkg files for your perlbr
# VERSION
-version 0.09
+version 0.10
# SYNOPSIS
@@ -19,14 +19,14 @@ Starman. It makes the following assumptions:
- XXX Perlbrew
- Runs under [Starman](http://search.cpan.org/perldoc?Starman)
-- Starman is fronted by nginx
+- Starman is fronted by nginx or apache
- It's installed at /srv/$packagename
- Logs will be placed in /var/log/$packagename
- psgi file is in script and is named $packagename.psgi
- Config is in config/ and can be found by your app with nothing more than it's HOME variable set. (FOO_BAR_HOME)
-- Nginx config is in config/nginx/$packagename.conf
+- Nginx config is in config/nginx/$packagename.conf or apache config is at config/apache/$packagename.conf
- Your app can be preloaded
-- Your app only listens on localhost (nginx handles the rest)
+- Your app only listens on localhost (nginx/apache handles the rest)
- You want 5 workers
This module provides defaults for the following attribute:
@@ -50,6 +50,11 @@ The port to use for starman.
The amount of time (in seconds) that the init script will wait on startup. Some
applications may require more than the default amount of time (30 seconds).
+## web_server
+
+Set the web server we'll be working with for this package. Supported values
+are `apache` and `nginx`.
+
# AUTHOR
Cory G Watson <gphat@cpan.org>
View
4 lib/Dist/Zilla/Plugin/Dpkg/PerlbrewStarman.pm
@@ -349,6 +349,7 @@ case "$1" in
# Remove logs
rm -rf /var/log/$PACKAGE
+ rm -rf /var/log/apache2/$PACKAGE
# Remove the home directory
rm -rf /srv/$PACKAGE
@@ -442,7 +443,8 @@ around '_generate_file' => sub {
fi
';
$_[2]->{webserver_restart} = 'a2enmod proxy proxy_http rewrite
-
+ a2ensite $PACKAGE
+ mkdir -p /var/log/apache2/$PACKAGE
if which invoke-rc.d >/dev/null 2>&1; then
invoke-rc.d apache2 restart
else
Please sign in to comment.
Something went wrong with that request. Please try again.