Created
January 15, 2015 16:36
-
-
Save chukShirley/e9b15218cf15caa8ae06 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Created by Zend Server | |
<VirtualHost *:${port}> | |
# Make ZF2 path available as environment variable | |
SetEnv ZF2_PATH /usr/local/zendsvr6/share/ZendFramework2/library | |
# Tell apache to serve index.php if the requested resource doesn't exist. | |
# This allows static files to be served directly while "ZF-friendly URLS" | |
# are sent to index.php | |
RewriteEngine on | |
<Location /> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} -s [OR] | |
RewriteCond %{REQUEST_FILENAME} -l [OR] | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^.*$ - [NC,L] | |
RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$ | |
RewriteRule ^(.*) - [E=BASE:%1] | |
RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L] | |
</Location> | |
# Tell apache which file to serve when no file name is specified | |
# This allows you to access the API with [server ip]:[port]/ rather | |
# than having to specify [server ip]:[port]/index.php | |
DocumentRoot "${docroot}" | |
<Directory "${docroot}"> | |
Options +Indexes FollowSymLinks | |
DirectoryIndex index.php | |
Order allow,deny | |
Allow from all | |
AllowOverride All | |
</Directory> | |
ServerName ${vhost}:${port} | |
# include the folder containing the vhost aliases for zend server deployment | |
Include "${aliasdir}/*.conf" | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment