Project

General

Profile

Sub URI for multisites at one domain » History » Version 1

Jiongliang Zhang, 2010-01-22 13:20
starting writing

1 1 Jiongliang Zhang
{{>toc}}
2
3
h2. Why we need SubURI in one domain for multisites
4
5
When there are many web sites on your hands, then how to deploy? what their relationship should be? If you are richer, and never care about money, then you can deploy them one server machine one site. But, as you know, we programmers, not so rich as we are, so... we may consider deploy one server machine multisites, and maybe we just want to deploy them at the server machine just has one network interface card, it means there is just one ip address. One ip address, there are also two resolving ways (If there's error, just tell me), one is virtual host (it needs to configure DNS server A record.), the other is multi directories. In there, I want to tell the second one.
6
7
h2. What it looks like
8
9
The multi directories deploy way, call it sub-uri way, is look like this:
10
* resuming the domain is "pfg.com" (ip address is ok), 
11
* there are two or more rails applications, app1, app2, ... appN
12
* web server is apache2.2
13
* Ruby 1.8.6
14
* Rails 2.1.x or Rails 2.2.x (a little different)
15
16
<pre>
17
http://pfg.com/app1
18
http://pfg.com/app2
19
...
20
http://pfg.com/appN
21
</pre>
22
23
Next, I will tell you how to configure them.
24
25
h2. How to configure them in Rails application
26
27
h2. Attention