Skip to content

Instantly share code, notes, and snippets.

@pixeline
Forked from gistwebdev/template
Last active February 22, 2016 00:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pixeline/922f6c541907ff3c1700 to your computer and use it in GitHub Desktop.
Save pixeline/922f6c541907ff3c1700 to your computer and use it in GitHub Desktop.
<VirtualHost *:80>
ServerAdmin template.email
ServerName template.url
ServerAlias www.template.url
# redirect www.domain.tld to domain.tld
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.+) [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,QSA,R=301]
# directory rules
DocumentRoot template.webroot
<Directory />
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<Directory template.webroot/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9001template.webroot/$1
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment