开发者

Serve anoher server from subdomain

on my root server http://my.root.ip I have a scrapy server running at http://my.root.ip:6800. I want to make http://my.root.ip:6800 accessable from a subdomain like http://scrapy.mydomain.com.

I know I can setup a vhost file and point the document root to somewhere on my server but now I have a server on a server actually.

ServerName scrapy.mydomain.com
ServerAdmin webmaster@localhost
DocumentRoot /path开发者_JS百科

 <Directory /path>
       Options Indexes FollowSymLinks MultiViews
       AllowOverride None
       Order allow,deny
       allow from all
 </Directory>

How can I do that? Do I have to add something to vhost file?


you need to add an A record to your dns fields.

Here is some more info: http://www.zytrax.com/books/dns/ch9/delegate.html

Also add the subdomain to the htaccess file

VirtualHost *:6800 

<VirtualHost *> 
ServerName www.website.com 
DocumentRoot "/var/www/html" 
</VirtualHost> 

<VirtualHost *> 
ServerName scrapy.website.com 
DocumentRoot "/var/www/scrapy" 
</VirtualHost>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜