Configure xampp to build a simple web server environment

1. Download xampp, address: HTTPS: //www.apachefriends.org/index.html 

2. Unpack and install, has been next, until the installation is successful. linux environment installed in / opt / lampp

3. Virtual Path Configuration
  1) Modify / opt / lampp / httpd-conf file, window environment etc should be the httpd-conf apache file in the directory
    <Directory />
      #AllowOverride none
      # All denied the Require
      the Order the deny, the allow
      the Allow from All
    </ Directory>

  # Virtual hosts
  Include etc/extra/httpd-vhosts.conf


  2)修改etc下httpd-vhost添加虚拟主机
    <VirtualHost 127.0.0.2:80>
      ServerAdmin [email protected]
      DocumentRoot "/home/ide/vscode/www/"
      ServerName www.example.com
      ServerAlias test.example.com
      ErrorLog "/home/ide/vscode/www/com-error_log"
      CustomLog "/home/ide/vscode/www/com-access_log" common
    </VirtualHost>

 

Guess you like

Origin www.cnblogs.com/yongfengnice/p/11041475.html