Skip to content

Instantly share code, notes, and snippets.

@Yoda-BZH
Forked from anonymous/gist:9857969
Last active August 29, 2015 13:57
Show Gist options
  • Save Yoda-BZH/9858147 to your computer and use it in GitHub Desktop.
Save Yoda-BZH/9858147 to your computer and use it in GitHub Desktop.
<VirtualHost 1.1.1.1:80>
ServerName example.com
RewriteEngine on
RewriteRule ^(.*) http://www.example.com [QSA,L,R=301]
CustomLog /home/www/example.com/log/apache/domaine-redirect.access.log combined env=!no_log
ErrorLog /home/www/example.com/log/apache/domaine-redirect.error.log
</VirtualHost>
<VirtualHost 1.1.1.1:80>
ServerAlias www.example.com
DocumentRoot /home/www/example.com/web/web/version_1
## Logs
CustomLog /home/www/example.com/log/apache/domaine.access.log combined env=!no_log
ErrorLog /home/www/example.com/log/apache/domaine.error.log
## / Logs
ProxyPass / http://example.com
ProxyPassReverse / http://example.com
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment