Local domain settings: local.dominio.pe
sudo vim /etc/apache2/sites-available/local.dominio.pe
Edit the file adding the next content
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName local.dominio.pe
DocumentRoot ~/htdocs/dominio/src/public
<Directory ~/htdocs/dominio/src/public>
SetEnv APPLICATION_ENV development
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride FileInfo
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/local.dominio.pe-error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/local.dominio.pe-access.log combined
</VirtualHost>
Type in your terminal(pass from sites-available to sites-enabled)
sudo a2ensite local.dominio.pe
sudo service apache2 restart
sudo vim /etc/hosts
127.0.0.1 local.dominio.pe
127.0.0.1 localhost
127.0.1.1 ftpi
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.0.1 local.dominio.pe
Finally add your new domain to web browser
local.dominio.pe