ubuntu 下用xampp配置虚拟站点

来源:互联网 发布:琢本网络 编辑:程序博客网 时间:2024/06/05 14:51

1. 编辑 /opt/lampp/etc/httpd.conf

a.

<Directory />
    Options FollowSymLinks
    AllowOverride all
    #XAMPP
    #Order deny,allow
    #Deny from all
</Directory>


b.

添加如下信息:


<VirtualHost *:80>
  ServerName www.localhost.com
  DocumentRoot "/var/www"
  DirectoryIndex index.php
  <Directory "/var/www">
    AllowOverride All
    Allow from All
  </Directory>

</VirtualHost>


2. 编辑 /etc/host

添加这行:

127.0.0.1    www.localhost.com


ok,搞定