Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
  • 12 commits
  • 4 files changed
  • 0 commit comments
  • 2 contributors
Showing with 32 additions and 47 deletions.
  1. +12 −0 README.md
  2. +0 −24 Readme.md
  3. +3 −0  bin/compile
  4. +17 −23 conf/httpd.conf
View
12 README.md
@@ -0,0 +1,12 @@
+# Heroku Buildpack for Static Files
+
+This is a [Heroku Buildpack](http://devcenter.heroku.com/articles/buildpack) for static apps.
+It uses Apache to statically serve your content.
+
+## Usage
+
+Make sure to have `index.html` in the root of your repository or else Heroku will not detect your static buildpack. After that you can run the following command.
+
+ heroku create --stack cedar --buildpack https://github.com/sjlu/heroku-buildpack-static.git
+
+You can also have the choice to password protect your application by simply adding Heroku configuration variables. To do so, run the following commands.
View
24 Readme.md
@@ -1,24 +0,0 @@
-Heroku buildpack: Static
-========================
-
-This is a [Heroku buildpack](http://devcenter.heroku.com/articles/buildpack) for static apps.
-It uses Apache to statically serve your content. It also supports securely serving your static content.
-To securely serve your content you need to set two variables:
-
- heroku config:add USERNAME=usernamehere
- heroku config:add PASSWORD=passwordhere
-
-
-Usage
------
-
-Example usage:
-
- $ cat 'hello world' > index.html
-
- $ heroku create --stack cedar --buildpack git@github.com:craigkerstiens/heroku-buildpack-static.git
-
- $ git push heroku master
- ...
-
-The buildpack will detect your app as Static if it has the file `index.html` in the root.
View
3  bin/compile
@@ -45,6 +45,9 @@ if [ ! -d $APACHE_PATH ]; then
curl --silent --max-time 60 --location $APACHE_URL | tar xz
fi
+#copy in the httpd.conf from the buildpack
+cp $BIN_DIR/../conf/httpd.conf $APACHE_PATH/conf/httpd.conf
+
cat >>boot.sh <<EOF
export LD_LIBRARY_PATH=/app/apache/lib/
View
40 conf/httpd.conf
@@ -2,13 +2,13 @@
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
-# In particular, see
+# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
-# consult the online docs. You have been warned.
+# consult the online docs. You have been warned.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
@@ -33,7 +33,7 @@ ServerRoot "/app/apache/"
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
-# Change this to Listen on specific IP addresses as shown below to
+# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
@@ -56,7 +56,7 @@ Listen 80
<IfModule !mpm_winnt_module>
#
# If you wish httpd to run as a different user or group, you must run
-# httpd as root initially and it will switch.
+# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
@@ -106,18 +106,13 @@ DocumentRoot "/app/www"
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
-# directory (and its subdirectories).
+# directory (and its subdirectories).
#
-# First, we configure the "default" to be a very restrictive set of
-# features.
+# First, we configure the "default" to be a very restrictive set of
+# features.
#
<Directory />
Options FollowSymLinks
- AllowOverride AuthConfig
- Order deny,allow
- Deny from all
- #AuthUserFile /app/.passwords
- #Require valid-user
</Directory>
#
@@ -157,7 +152,6 @@ DocumentRoot "/app/www"
#
Order allow,deny
Allow from all
-
</Directory>
#
@@ -169,8 +163,8 @@ DocumentRoot "/app/www"
</IfModule>
#
-# The following lines prevent .htaccess and .htpasswd files from being
-# viewed by Web clients.
+# The following lines prevent .htaccess and .htpasswd files from being
+# viewed by Web clients.
#
<FilesMatch "^\.ht">
Order allow,deny
@@ -225,8 +219,8 @@ LogLevel warn
<IfModule alias_module>
#
- # Redirect: Allows you to tell clients about documents that used to
- # exist in your server's namespace, but do not anymore. The client
+ # Redirect: Allows you to tell clients about documents that used to
+ # exist in your server's namespace, but do not anymore. The client
# will make a new request for the document at its new location.
# Example:
# Redirect permanent /foo http://www.example.com/bar
@@ -243,7 +237,7 @@ LogLevel warn
# the filesystem path.
#
- # ScriptAlias: This controls which directories contain server scripts.
+ # ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the target directory are treated as applications and
# run by the server when requested rather than as documents sent to the
@@ -351,10 +345,10 @@ DefaultType text/plain
#
#
-# EnableMMAP and EnableSendfile: On systems that support it,
+# EnableMMAP and EnableSendfile: On systems that support it,
# memory-mapping or the sendfile syscall is used to deliver
# files. This usually improves server performance, but must
-# be turned off when serving from networked-mounted
+# be turned off when serving from networked-mounted
# filesystems or if support for these functions is otherwise
# broken on your system.
#
@@ -363,9 +357,9 @@ DefaultType text/plain
# Supplemental configuration
#
-# The configuration files in the conf/extra/ directory can be
-# included to add extra features or to modify the default configuration of
-# the server, or you may simply copy their contents here and change as
+# The configuration files in the conf/extra/ directory can be
+# included to add extra features or to modify the default configuration of
+# the server, or you may simply copy their contents here and change as
# necessary.
# Server-pool management (MPM specific)

No commit comments for this range

Something went wrong with that request. Please try again.