XAMPP for Linux 实现域名绑定到指定目录

来源:互联网 发布:金万维免费域名 编辑:程序博客网 时间:2024/05/29 19:23

step 1:

    找到xampp目录下的etc目录中的httpd.conf文件,进入编辑模式后找到里面的

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

改为:

# Virtual hostsInclude etc/extra/httpd-vhosts.conf

step 2:

然后找到extra里面的httpd-vhosts.conf文件,进入编辑模式吼,按如下进行修改:

<VirtualHost *:80>    ServerAdmin webmaster@dummy-host.example.com    DocumentRoot /opt/lampp/htdocs/b    (这里写上所绑定到的目录)    ServerName www.linuxidc.com                              (这里写上域名)    ServerAlias www.dummy-host.example.com    ErrorLog logs/dummy-host.example.com-error_log    CustomLog logs/dummy-host.example.com-access_log common</VirtualHost>

step 3:

重启apache后生效

1 0
原创粉丝点击