Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # How to install this:
- #
- # 1) As root, save this text document as
- # /etc/lighttpd/conf-enabled/20-subs.conf
- #
- # 2) As root: service lighttpd restart
- #
- # 3) Make a directory called .site in /var/www
- #
- # 4) Create subdomain directories inside /var/www/.site
- # (for example /var/www/.site/javs)
- # enable the dynamic subdomain feature
- server.modules += ( "mod_evhost" )
- evhost.path-pattern = "/var/www"
- # this blocks the .site folder from being accessed directly
- $HTTP["url"] =~ "^/.site" {
- url.access-deny = ("")
- }
- # and this enables stuff like subdomain.yourdomain.tld
- $HTTP["host"] =~ "^[a-zA-Z0-9\._-]+\.yourdomain.tld$" {
- evhost.path-pattern = "/var/www/.site/%3/"
- }
Advertisement
Add Comment
Please, Sign In to add comment