我们已经使用Xampp创建了一个Linux服务器.但我们有3-4个网站,我们必须住在那里.但在xampp中,根文件夹中只有一个网站.

On httpd.conf file:

Include conf/extra/httpd-vhosts.conf

我们需要帮助设置httpd vHost.conf文件.

推荐答案

您可以使用以下代码:

<;虚拟主机*:80>;

The name your website should respond to

服务器名foo.通用域名格式

Tell Apache where your document root is

DocumentRoot/var/www/html/foo.通用域名格式

Add this line if you are allowing .htaccess overrides.

<;目录/var/www/html/foo.com>;

<;虚拟主机*:80>;

The name your website should respond to

服务器名栏.通用域名格式

Tell Apache where your document root is

DocumentRoot/var/www/html/bar.通用域名格式

Add this line if you are allowing .htaccess overrides.

<;目录/var/www/html/bar.com>;

更多详情请查看:check here

Linux相关问答推荐

奇怪的 Bash 脚本行为

Docker 守护进程安装在 ubuntu jenkins docker 容器代理权限被拒绝

匹配模式和提取

使用 grep 时如何跳过第一行和最后一行?

如何使用 ftrace 过滤查看函数上方的调用堆栈?

linux shell 脚本获取文件夹中

awk 不打印所需的 df 输出

使用打印命令 Select 子域

普通用户 chown(仅更改组)

如何在 Linux 上使用 Python 判断进程是否仍在运行?

为什么我不能将 Unix Nohup 与 Bash For 循环一起使用?

argv的编码是什么?

Linux 应用程序分析

如何在 linux ElementaryOS 中修复 Genymotion,但未找到错误CXXABI_1.3.8

将 jiffies 转换为毫秒

如何让 cron 每N分钟运行一次,其中 n % 5 == 1?

如何从目录复制内容而不是符号链接?

如何在没有 root 用户的情况下在 Linux (CentOS) 中安装软件包并进行自动依赖处理?

如何在redhat linux上安装maven

Linux:删除多个文件的文件扩展名