Skip to content

Instantly share code, notes, and snippets.

@williamn
Last active October 12, 2018 02:37
Show Gist options
  • Save williamn/acbd54ddd8109997f598 to your computer and use it in GitHub Desktop.
Save williamn/acbd54ddd8109997f598 to your computer and use it in GitHub Desktop.
CakePHP 2.5 virtual host configuration example on Apache 2.4 Windows 8.1
<VirtualHost *:80>
ServerName 10.10.0.3
DocumentRoot /home/vagrant/htdocs/apad2/app/webroot
<Directory /home/vagrant/htdocs/apad2/app/webroot>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error-apad.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access-apad.log combined
</VirtualHost>
<VirtualHost *:80>
Define appname foo
Define webroot "C:\Users\Asus\htdocs\my-projects\${appname}\app\webroot"
ServerName ${appname}.local
DocumentRoot ${webroot}
<Directory ${webroot}>
Options Indexes FollowSymlinks ExecCGI
AllowOverride All
Require all granted
</Directory>
ErrorLog "logs\${appname}-error.log"
CustomLog "logs\${appname}-access.log" common
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment