由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
StartUp版 - httpd question
相关主题
business directorydo you think directory site still worthwhile?
这里有没有domainer?Theplannet在国内的访问速度到底怎么样?
哪里注册域名比较好?怎么确认通过PDF过来的访问
难道真的有抢注域名的spider?网站换框架
最近有没有域名注册的deal啊?想出售Email list! (转载)
got three awesome domain names! haha有用 justhost 的么?
what's cheap way to register a new domain (used in China and USA)对于google来说, 301 redirect多长时间后可以取消?
网站的推广(欢迎补充)请问网站更新/维护期间,怎么对外关闭?
相关话题的讨论汇总
话题: user话题: html话题: www话题: var话题: httpd
进入StartUp版参与讨论
1 (共1页)
bz
发帖数: 1770
1
if there is a server at 1.2.3.4 listening on port 80, is it possible to
redirect user to different directories based on the user's inputs? e.g. if
user types http://www.xyz.com, then pages under /var/www/html/xyz get loaded. if user types http://www.123.com, then pages under /var/www/html/123 get loaded?
Thanks
g********g
发帖数: 2172
2
Yes, you can host many sites/domains on one IP address.

【在 bz 的大作中提到】
: if there is a server at 1.2.3.4 listening on port 80, is it possible to
: redirect user to different directories based on the user's inputs? e.g. if
: user types http://www.xyz.com, then pages under /var/www/html/xyz get loaded. if user types http://www.123.com, then pages under /var/www/html/123 get loaded?
: Thanks

bz
发帖数: 1770
3
but need to be on different ports? I dont want to see
http://1.2.3.4:8888 for www.xyz.com and http://1.2.3.4:7777 for www.123.com.
web forwarding seems not working well with china. ok in usa though.

if

【在 g********g 的大作中提到】
: Yes, you can host many sites/domains on one IP address.
D******y
发帖数: 3780
4
they can be on port 80 at same time as long as they have different host/
domain entry.
google apache virtual server

【在 bz 的大作中提到】
: but need to be on different ports? I dont want to see
: http://1.2.3.4:8888 for www.xyz.com and http://1.2.3.4:7777 for www.123.com.
: web forwarding seems not working well with china. ok in usa though.
:
: if

I*****y
发帖数: 6402
5
this can be done by setting up virtual host in your httpd.conf file.

【在 bz 的大作中提到】
: if there is a server at 1.2.3.4 listening on port 80, is it possible to
: redirect user to different directories based on the user's inputs? e.g. if
: user types http://www.xyz.com, then pages under /var/www/html/xyz get loaded. if user types http://www.123.com, then pages under /var/www/html/123 get loaded?
: Thanks

bz
发帖数: 1770
6
could you give samples for http://www.xyz.com and http://www.123.com
my httpd.conf looks like
Listen 80
NameVirtualHost *:80

ServerAdmin w*******[email protected]
DocumentRoot /var/www/html/xyz
ServerName http://www.xyz.com
ErrorLog logs/xyz.com-error_log
CustomLog logs/xyz.com-access_log common


ServerAdmin w*******[email protected]
DocumentRoot /var/www/html/123
ServerName http://www.123.com
ErrorLog logs/123.com-error_log

【在 I*****y 的大作中提到】
: this can be done by setting up virtual host in your httpd.conf file.
D******y
发帖数: 3780
7
try remove http:// from ServerName value

【在 bz 的大作中提到】
: could you give samples for http://www.xyz.com and http://www.123.com
: my httpd.conf looks like
: Listen 80
: NameVirtualHost *:80
:
: ServerAdmin w*******[email protected]
: DocumentRoot /var/www/html/xyz
: ServerName http://www.xyz.com
: ErrorLog logs/xyz.com-error_log
: CustomLog logs/xyz.com-access_log common

L*1
发帖数: 11537
8
1. take out the http:// as suggested above
2. If you just host two domains, one is already configured as main server,
then you do not need to repeat in virtual host.
3. Make sure the domains resolve to the IP of your server.

【在 bz 的大作中提到】
: could you give samples for http://www.xyz.com and http://www.123.com
: my httpd.conf looks like
: Listen 80
: NameVirtualHost *:80
:
: ServerAdmin w*******[email protected]
: DocumentRoot /var/www/html/xyz
: ServerName http://www.xyz.com
: ErrorLog logs/xyz.com-error_log
: CustomLog logs/xyz.com-access_log common

1 (共1页)
进入StartUp版参与讨论
相关主题
请问网站更新/维护期间,怎么对外关闭?最近有没有域名注册的deal啊?
briteguy, 能不能推荐本marketing方面的书?got three awesome domain names! haha
唉,我的一个小网站居然也被人山寨了what's cheap way to register a new domain (used in China and USA)
新手问开startup的问题网站的推广(欢迎补充)
business directorydo you think directory site still worthwhile?
这里有没有domainer?Theplannet在国内的访问速度到底怎么样?
哪里注册域名比较好?怎么确认通过PDF过来的访问
难道真的有抢注域名的spider?网站换框架
相关话题的讨论汇总
话题: user话题: html话题: www话题: var话题: httpd