In Magento, at from core_config_data
table, at the moment, I see that we must set base_url
ip is 192.168.1.100
.
If I move it into a another computer it will not work. Why I need to do this? Cause our developers code at their local and commit source code to another server (ip is 192.168.1.113, for example) to automatically build.
So, my question is how to cross server with Magento?
Please, see the below table if you need to have the context.
mysql> select * from core_config_data;
+-----------+---------+----------+-----------------------------------------------------+-----------------------------
| config_id | scope | scope_id | path | value
+-----------+---------+----------+-----------------------------------------------------+-----------------------------
| 1 | default | 0 | web/seo/use_rewrites 开发者_Python百科| 0
| 2 | default | 0 | admin/dashboard/enable_charts | 1
| 3 | default | 0 | web/unsecure/base_url | http://192.168.1.100/
| 4 | default | 0 | web/secure/base_url | http://192.168.1.100/
You can create a new view of your store and assign to it a new base_url. So:
- Create a new store view on System » Manage Stores
- Go to System » Configuration and select the new store view
- On General » Web you can change the base_url
That's all. Be sure that all your products and other things are available for all the store views (by default, it is that way).
If I understand your question correctly, you could solve it with an entry in your hosts file on the developer machines. Instead of using the IP in the URL, you use a FQDN and add that FQDN into the developer's hosts file with either their local IP address or the loopback IP address.
精彩评论