为子域设置Apache [英] setup Apache for Subdomains

查看:82
本文介绍了为子域设置Apache的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI all,

i在远程服务器上有一个域 abc.info ,其文件托管在 217.56.34.12 上,托管的子域subdomain.abc .info让 80.45.1.26(" / docs / www /")和另一个 subdomain2.abc.info 也托管在 80.45.1.26(" / docs / www / domain2")

我正在运行 apache ,当我输入 subdomain.abc.info 时,我应该在apache中做什么设置,然后打开 / docs / www 中的内容,并输入 subdomain2。 abc.info 它打开了 / docs / www / subdomain2 / 的内容


我试过虚拟主机如下

HI all,
i have a domain abc.info on a remote server and its files are hosted on let say 217.56.34.12, and a subdomain subdomain.abc.info hosted on let say 80.45.1.26 ("/docs/www/") and another subdomain2.abc.info is also hosted on 80.45.1.26 ("/docs/www/domain2")
I''m running apache, what settings should i do in apache when as i type subdomain.abc.info and it opens the contents in /docs/www and as i type subdomain2.abc.info it opens the contents of /docs/www/subdomain2/

I have tried virtual host as follow

展开 | 选择 | Wrap | 行号

推荐答案

Apache正在运行 80.45.1.26
Apache is running on 80.45.1.26


我相信,并且不要不要理解,你需要在< VirtualHost>中指定域名。标签:

I believe, and don''t hold me to this, that you need to specify the domain name in the <VirtualHost> tag as well:

展开 | 选择 | Wrap | 行号


是的,同样检查过,同样的事情。


两个子域名都指向同一内容/ docs / www
yeah checked with that as well, same thing again.

both subdomains pointing me to same content "/docs/www"


这篇关于为子域设置Apache的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆