0
基於路徑VirtualHosts
我想爲我們的API基於路徑的版本系統,是這樣的:與客運,機架和Apache
GET api.ingeniapi.com/v1/items
VS
GET api.ingeniapi.com/v2/items/magic_new_thing
如何設置Apache從這些路由流量兩條路徑到不同的機架應用?
現在,我有這樣的事情:
<VirtualHost *:443>
ServerName api.ingeniapi.com:443
RackEnv production
DocumentRoot /services/api_gateway/current/public
<Directory /services/api_gateway/current/public >
Allow from all
Options -MultiViews
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName api.test.ingeniapi.com
RackEnv production
DocumentRoot /services/api_gateway/current/public
<Directory /services/api_gateway/current/public >
Allow from all
Options -MultiViews
</Directory>
</VirtualHost>