Setting up a virtual hosts or subdomains for localhost
On Mac: Open Terminal and open + edit
$ sudo nano /etc/hosts
On Windows: Open Explorer and open + edit
C:\Windows\System32\drivers\etc\hosts
127.0.0.1 localhost
127.0.0.1 local
127.0.0.1 virtual-host
127.0.0.1 virtual.host
127.0.0.1 virtualhost.whatever
On Mac: Open Finder and open + edit
MAMP > conf > apache > httpd.conf
On Windows: Open Explorer and open + edit
xampp > apache > conf > httpd.conf
# Virtual Hosts
Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
On Mac: Open Finder and open + edit
MAMP > conf > apache > extra > httpd-vhosts.conf
On Windows: Open Explorer and open + edit
xampp > apache > conf > extra > httpd-vhosts.conf
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "/root"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/root/friedrich-schultheiss.de"
ServerName friedrich-schultheiss.local
<Directory "/root/friedrich-schultheiss.de">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
AllowOverride all
</Directory>
</VirtualHost>