开发者

HOw can i use subdomain with django and mod_wsgi

I have my main site at www开发者_C百科.example.com

I want to run sites like site1.example.com

I tried this

<VirtualHost ip:80>
DocumentRoot /home/user/django/app
ServerAlias site1.example.com

I have also added record to /etc/hosts but its not working.

i am able to ping site1.example.com from server but not from outside


i am able to ping site1.example.com from server but not from outside

This is not a Django problem. ping is a low-level IP protocol (ICMP) that is handled well down from the HTTP server (application) level.

Adding something to /etc/hosts only affects the machine that /etc/hosts is on.

You should get subdomains working with static web pages (e.g. "Hello World") first, leaving Django out of it. Then read up on django.contrib.sites and go from there.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜