Virtual Host Route Point (crud-admin-generator)

I am following the installation steps of Crud Admin Generator and trying to easily create a backend application based on an existing database.

During the installation steps, he says the following:

You need to point the document root of your virtual host to /path_to/admingenerator/web

This is an example of VirtualHost:

<VirtualHost *:80>
   DocumentRoot /path_to/admingenerator/web
   DirectoryIndex index.php
   <Directory "/path_to/admingenerator/web">
        Options Indexes FollowSymLinks
        Order Allow,Deny
        Allow from all
        AllowOverride all
        <IfModule mod_php5.c>
           php_admin_flag engine on
           php_admin_flag safe_mode off
           php_admin_value open_basedir none
        </ifModule>
   </Directory>
</VirtualHost>

I am not sure where to put this or how to finish the setup, because I am stuck at this step. Im using Mac OSx and a MAMP server, so all my applications, etc. Stored in Applications / MAMP / htdocs

Can anyone help?

+4
source share
1 answer

First find the path to yours httpd.conf. In my case, the path is as follows:

/Applications/MAMP/conf/apache/httpd.conf

# Virtual Hosts
Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf

VirtualHosts ServerName , http://crud.com. /etc/hosts

127.0.0.1    crud.com

/Applications/MAMP/conf/apache/extra/httpd-vhosts.conf

<VirtualHost *:80>
   DocumentRoot /path_to/admingenerator/web
   DirectoryIndex index.php
   ServerName crud.com
   ServerAlias www.crud.com 
   <Directory "/path_to/admingenerator/web">
        Options Indexes FollowSymLinks
        Order Allow,Deny
        Allow from all
        AllowOverride all
        <IfModule mod_php5.c>
           php_admin_flag engine on
           php_admin_flag safe_mode off
           php_admin_value open_basedir none
        </ifModule>
   </Directory>
</VirtualHost>

, MAMP - http://crud.com.

0

Source: https://habr.com/ru/post/1624704/


All Articles