Skip to content

Instantly share code, notes, and snippets.

@ScreamingDev
Last active December 10, 2015 16:29
Show Gist options
  • Save ScreamingDev/4461356 to your computer and use it in GitHub Desktop.
Save ScreamingDev/4461356 to your computer and use it in GitHub Desktop.
Apache2 Subdomain Config
# NameVirtualHost subdomain.example.tld:80
<VirtualHost *:80>
ServerAdmin webmaster@exmaple.tld
ServerName subdomain.example.tld
ServerAlias subdomain.example.tld
DocumentRoot /var/www/subdomain.example.tld
# PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.5
# PassengerRuby /usr/bin/ruby1.8
<Directory /var/www/subdomain.example.tld>
Options -Indexes +FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
# server logs most of it
LogLevel notice
CustomLog ${APACHE_LOG_DIR}/subdomain.example.tld_access.log combined
ErrorLog ${APACHE_LOG_DIR}/subdomain.example.tld_error.log
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment