Skip to content

Instantly share code, notes, and snippets.

@napoler
Forked from olragon/run.sh
Last active August 29, 2015 14:13
Show Gist options
  • Save napoler/bcb44b1c5b6ed4d088c3 to your computer and use it in GitHub Desktop.
Save napoler/bcb44b1c5b6ed4d088c3 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
sudo hhvm --config site1.hhvm.hdf --user www-data --mode daemon -v "Log.Level=Verbose" -v "Log.NoSilencer=on" -v "Log.Header=on"
Server {
Port = 8001
SourceRoot = /var/www/site1
DefaultDocument = index.php
}
Eval {
Jit = true
}
Log {
Level = Error
UseLogFile = true
File = /var/log/hhvm/error.log
Access {
* {
File = /var/log/hhvm/access.log
Format = %h %l %u %t \"%r\" %>s %b
}
}
}
VirtualHost {
* {
Pattern = .*
ServerVariables {
PHP_SELF = /index.php
SCRIPT_NAME = /index.php
}
RewriteRules {
index {
pattern = ^(.*)$
to = index.php/$1
qsa = true
}
}
}
}
StaticFile {
FilesMatch {
* {
pattern = .*\.(dll|exe)
headers {
* = Content-Disposition: attachment
}
}
}
Extensions {
css = text/css
gif = image/gif
html = text/html
jpe = image/jpeg
jpeg = image/jpeg
jpg = image/jpeg
png = image/png
tif = image/tiff
tiff = image/tiff
txt = text/plain
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment