Simple way to get FRAPI working in directory.

46 views
Skip to first unread message

getz...@gmail.com

unread,
Sep 6, 2013, 3:09:10 PM9/6/13
to frapi-...@googlegroups.com
I use ubuntu with zend server ce 6.0 do developer some mobiles sites.

To get way FRAPI working in any folder, just simples, map proxy for FRAPI VHOSTS like:

----- frapi.sites -----
<VirtualHost *:80>
    ServerName admin.frapi
    DirectoryIndex index.php
    ServerAdmin ad...@api.frapi

    # This should be omitted in the production environment
    SetEnv APPLICATION_ENV development

    DocumentRoot /var/www/frapi/src/frapi/admin/public
    <Directory /var/www/frapi/src/frapi/admin/public>
        AllowOverride All
        Order deny,allow
        Allow from All
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName api.frapi
    ServerAdmin ad...@api.frapi
    DocumentRoot /var/www/frapi/src/frapi/public

    # This should be omitted in the production environment
    SetEnv APPLICATION_ENV development

    <Directory /var/www/frapi/src/frapi/public>
        AllowOverride All
        Order deny,allow
        Allow from All
    </Directory>
</VirtualHost>

#ApiFolder      
ProxyPass               /api/v2/ http://api.frapi/
ProxyPassReverse   /api/v2/ http://api.frapi/

#AdminFrapi
ProxyPass               /admin/ http://api.frapi/
ProxyPassReverse   /admin/ http://api.frapi/


----- end of frapi.sites -----

Enable mod_proxy in webserver and set ProxyRequests Off to working.

a2enmod proxy*
a2ensite frapi.sites

To access:


That's all!


getz...@gmail.com

unread,
Sep 6, 2013, 3:10:33 PM9/6/13
to frapi-...@googlegroups.com, getz...@gmail.com
In time in localmachine of FRAPI put 2 lines in /etc/hosts

127.0.0.1        admin.frapi
127.0.0.1       api.frapi

Reply all
Reply to author
Forward
0 new messages