It's possible:
<default>
<web>
<unsecure>
<base_url>https://foo.dev/</base_url>
</unsecure>
<secure>
<base_url>https://foo.dev/</base_url>
</secure>
</web>
</default>
<websites>
<ws_code>
<web>
<unsecure>
<base_url>http://ws.foo.dev/</base_url>
</unsecure>
<secure>
<base_url>https://ws.foo.dev/</base_url>
</secure>
</web>
</ws_code>
</websites>
<stores>
<store_code>
<web>
<unsecure>
<base_url>http://store.foo.dev/</base_url>
</unsecure>
<secure>
<base_url>https://store.foo.dev/</base_url>
</secure>
</web>
</store_code>
</stores>
However if anyone ever saves (or has saved) the System > Configuration > Web
section in the admin, the values in your config file for that scope will not apply.
There are a couple of strategies for protecting your entries
Use the file-based config approach and disable access to the Web section via admin user roles (for all users). Caveat: you'll need to provide all of the configuration options in your config.
Use setup scripts (PHP) to write the base_url
entries to the core_config_data
table, and protect them from being overwritten via an observer configured under the adminhtml
event area for the core_config_data_save_before
event.
You could also combine the observer protection from strategy #2 with the file-based config from strategy #1.