chukShirley
1/15/2015 - 4:36 PM

gistfile1.txt

# 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>