web: apache虚拟机配置(xampp)


apache虚拟机配置(xampp)

一、xampp(网站集成环境)

  1、xampp官网地址:https://www.apachefriends.org/index.html

  2、xampp下载地址(官方):https://www.apachefriends.org/download.html

  3、xampp下载地址(其他-下载速度很快):https://xampp-windows.en.softonic.com/

二、apache虚拟机配置(install_folder/xampp/8012/apache/conf/extra/httpd-vhosts.conf)

# httpd-vhosts.conf

# Virtual Hosts
#
# Required modules: mod_log_config

# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
#
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
##NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ##ServerName or ##ServerAlias in any block.
#
##
##ServerAdmin webmaster@dummy-host.example.com
##DocumentRoot "D:/tools/website/xampp/8012/htdocs/dummy-host.example.com"
##ServerName dummy-host.example.com
##ServerAlias www.dummy-host.example.com
##ErrorLog "logs/dummy-host.example.com-error.log"
##CustomLog "logs/dummy-host.example.com-access.log" common
##

##
##ServerAdmin webmaster@dummy-host2.example.com
##DocumentRoot "D:/tools/website/xampp/8012/htdocs/dummy-host2.example.com"
##ServerName dummy-host2.example.com
##ErrorLog "logs/dummy-host2.example.com-error.log"
##CustomLog "logs/dummy-host2.example.com-access.log" common
##

 

 


# 2021-11-17 by me
#
# httpd-vhosts.conf (' D:/tools/website/xampp/8012/apache/conf/extra/httpd-vhosts.conf ')
#
# virtualhost are based name with apache, you must turn on items 'NameVirtualHost *:80'
#
# 1. NameVirtualHost *:80
#
# 2. configure file: hosts (' C:/Windows/System32/drivers/etc/hosts' )
#
# test for databases website 2021-10-19
# 10.10.10.12 lidawei.com
# 10.10.10.12 test.com
# 10.10.10.12 laohu.com
# 10.10.10.12 cn8.com


# NameVirtualHost *:80
#
# # DocumentRoot "G:/phpWorkspaces/php_storm/projects/cn8"
# DocumentRoot "G:/phpWorkspaces/php_storm/projects/cn8"
# ServerName cn8.com
#
# AllowOverride All
# Require all granted
#
#

 

# NameVirtualHost *:80
#
# # DocumentRoot "G:/phpWorkspaces/php_storm/projects/cn8"
# DocumentRoot "G:/webWorkspaces/var/www/html/backup/php_mysql_example"
# ServerName laohu.com
#
# AllowOverride All
# Require all granted
#
#

 


  DocumentRoot "G:/webWorkspaces/dlt"
  ServerName test.com
  
    AllowOverride All
    Require all granted
  

 

 

 

 

 

 

web