artemsites
11/9/2018 - 7:36 PM

Lampp пример создания локального домена (Linux).

Lampp пример создания локального домена (Linux).

/**************************************
1.  sudo gedit /opt/lampp/etc/httpd.conf
    uncomment line:
**************************************/
Include etc/extra/httpd-vhosts.conf

/***************************************************
2.  sudo gedit /opt/lampp/etc/extra/httpd-vhosts.conf
    add this code to the end file:
***************************************************/
<VirtualHost *:80> 
    ServerName testdomain.com
    DocumentRoot "/home/artem/MEGA/Webmaster/Projects/localhost/testdomain.com" 
    <Directory "/home/artem/MEGA/Webmaster/Projects/localhost/testdomain.com"> 
        Options Indexes FollowSymLinks Includes ExecCGI 
        AllowOverride All 
        Require all granted 
    </Directory> 
    ErrorLog "logs/testdomain.com-error_log" 
</VirtualHost>

/**********************
3.  add this code to the end file:
    sudo gedit /etc/hosts
    127.0.0.1 testdomain.com
**********************/