Skip to content

Commit 656dd45

Browse files
authored
MAGECLOUD-2128 Multi-site URLs (magento#2714)
* Remove old note from config topic * MAGECLOUD-2128 update multisite URL construct * Fix magento#1785 * MAGECLOUD-2128 Formatting and fixes from feedback * Remve old graphics and fix steps so don't need them * remind to add to the secure section * edits based on feedback * broken link * more broken links after running report These links are not really associated with the point of this PR, but fixed them anyway. * Reformatted all steps locations are italicized, elements of action are bold
1 parent 7bec1d5 commit 656dd45

File tree

9 files changed

+232
-258
lines changed

9 files changed

+232
-258
lines changed
-41.3 KB
Binary file not shown.
-81.9 KB
Binary file not shown.

guides/v2.1/cloud/access-acct/first-time-setup_import-prepare.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
---
22
group: cloud
3-
subgroup: 080_setup
43
title: Prepare your existing Magento Commerce install
5-
menu_title: Prepare your existing Magento Commerce install
6-
menu_order: 153
7-
menu_node:
8-
level3_menu_node: level3child
9-
level3_subgroup: import
104
version: 2.1
115
functional_areas:
126
- Cloud
@@ -34,7 +28,7 @@ To import {{site.data.var.ee}} code to a {{site.data.var.ece}} project, you need
3428
* [`.magento.app.yaml`]({{ page.baseurl }}/cloud/project/project-conf-files_magento-app.html) manages applications, service relationships, mounts for writable directories, and cron jobs
3529
* [`.magento/services.yaml`]({{ page.baseurl }}/cloud/project/project-conf-files_services.html) for service configurations including MySQL, PHP, Redis, Solr (2.0.X only), ElasticSearch (2.1.X and later)
3630
* [`.magento/routes.yaml`]({{ page.baseurl }}/cloud/project/project-conf-files_routes.html) for handling routes including redirections, caching, and server-side includes
37-
* [`magento-vars.php`]({{ page.baseurl }}/cloud/project/project-multi-sites.html#cloud-multi-stores-magento-vars) for multiple websites and stores
31+
* [`magento-vars.php`]({{ page.baseurl }}/cloud/project/project-multi-sites.html) for multiple websites and stores
3832

3933
You need to add these files to your {{site.data.var.ee}} code:
4034

guides/v2.1/cloud/project/project-conf-files_magento-app.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ crons:
269269
cmd: "php bin/magento cron:run"
270270
```
271271

272-
For {{site.data.var.ece}} 2.1.X, you can use only [workers](#workers) and [cron jobs](#crons). For {{site.data.var.ece}} 2.2.X, cron jobs launch consumers to process batches of messages, and do not require additional configuration.
272+
For {{site.data.var.ece}} 2.1.X, you can use only workers and [cron jobs](#crons). For {{site.data.var.ece}} 2.2.X, cron jobs launch consumers to process batches of messages, and do not require additional configuration.
273273

274274
For more information, see [Set up cron jobs]({{ page.baseurl }}/cloud/configure/setup-cron-jobs.html).
275275

guides/v2.1/cloud/project/project-conf-files_routes.md

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ magento-cloud environment:routes
3333
+-------------------+----------+---------------+
3434
```
3535

36-
## Route templates {#cloud-yaml-routes-temp}
36+
## Route templates
3737

3838
The `routes.yaml` file is a list of templated routes and their configurations. A route template looks similar to this: `http://www.{default}/` or `https://{default}/blog`, where `{default}` is the qualified domain name configured for the project. For example, the routes for `example.com` domain resolve to the following:
3939

@@ -53,19 +53,22 @@ For example, if the project ID is `mswy7hzcuhcjw` on a branch called `refactorcs
5353
5454
<!-- {{site.data.var.ece}} also supports [multiple applications]({{ page.baseurl }}/cloud/project/project-conf-multi.html) per project. Each project has a single `routes.yaml` file that defines which request is routed to which application. -->
5555
56-
## Route options {#cloud-yaml-routes-opts}
56+
## Route options
5757
5858
Configure each route separately using the following properties:
5959
60-
- `type: upstream`—serves an application. Also, it has an `upstream` property that specifies the name of the application (as defined in `.magento.app.yaml`) followed by the `:http` endpoint.
61-
- `type: redirect`—redirects to another route. It is followed by the `to` property, which is an HTTP redirection to another route identified by its template.
62-
- `cache`—controls [caching for the route]({{ page.baseurl }}/cloud/project/project-routes-more-cache.html).
63-
- `redirects`—controls [redirect rules]({{ page.baseurl }}/cloud/project/project-routes-more-redir.html).
64-
- `ssi`—controls enabling of [Server Side Includes]({{ page.baseurl }}/cloud/project/project-routes-more-ssi.html).
60+
Property | Description
61+
---------------- | -----------
62+
`type: upstream` | Serves an application. Also, it has an `upstream` property that specifies the name of the application (as defined in `.magento.app.yaml`) followed by the `:http` endpoint.
63+
`type: redirect` | Redirects to another route. It is followed by the `to` property, which is an HTTP redirection to another route identified by its template.
64+
`cache:` | Controls [caching for the route]({{ page.baseurl }}/cloud/project/project-routes-more-cache.html).
65+
`redirects:` | Controls [redirect rules]({{ page.baseurl }}/cloud/project/project-routes-more-redir.html).
66+
`ssi:` | Controls enabling of [Server Side Includes]({{ page.baseurl }}/cloud/project/project-routes-more-ssi.html).
67+
{:style="table-layout:auto;"}
6568
66-
## Simple routes {#cloud-yaml-routes-sample-simple}
69+
## Simple routes
6770
68-
The following sample routes the naked domain and the `www` subdomain to the `frontend`application. This route does not redirect HTTPS:
71+
The following sample routes the apex domain and the `www` subdomain to the `frontend`application. This route does not redirect HTTPS:
6972
7073
```yaml
7174
"http://{default}/":
@@ -77,7 +80,7 @@ The following sample routes the naked domain and the `www` subdomain to the `fro
7780
to: "http://{default}/"
7881
```
7982

80-
The following sample route does not redirect from the `www` to the naked domain; instead, it serves from both:
83+
The following sample route does not redirect from the `www` to the apex domain; instead, it serves from both:
8184

8285
```yaml
8386
"http://{default}/":
@@ -91,7 +94,7 @@ The following sample route does not redirect from the `www` to the naked domain;
9194
9295
In the first sample, the server responds directly to a request of the form `http://example.com/hello`, but it issues a _301 redirect_ for `http://www.example.com/mypath` (to `http://example.com/mypath`).
9396

94-
## Wildcard routes {#cloud-yaml-routes-sample-wild}
97+
## Wildcard routes
9598
{{site.data.var.ece}} supports wildcard routes, so you can map multiple subdomains to the same application. This works for {% glossarytooltip 510de766-1ebd-4546-bf38-c618c9c945d2 %}redirect{% endglossarytooltip %} and upstream routes. You prefix the route with an asterisk (\*). For example, the following routes to the same application:
9699

97100
- `*.example.com`
@@ -103,29 +106,31 @@ This functions as a catch-all domain in a live environment.
103106

104107
### Routing a non-mapped domain
105108

106-
You can route to a system that is not mapped to a domain using the dot (\.) to separate the subdomain.
109+
You can route to a system that is not mapped to a domain using a dot (\.) to separate the subdomain. For example, a project with an `add-theme` branch routes to `http://add-theme-projectID.us.magento.com/`.
107110

108-
{% include note.html type="info" content="Projects provisioned before December 8, 2017, use the triple dash (\-\-\-) as a separator for the subdomain." %}
109-
110-
For example, a project with the `vmwklxcpbi6zq` ID and an `add-theme` branch routes to `http://add-theme-vmwklxcpbi6zq.us.magento.com/`.
111-
112-
If you define a `http://www.{default}/` route, the route becomes `http://www.add-theme-vmwklxcpbi6zq.us.magento.com/`.
111+
If you define a `http://www.{default}/` route, the route becomes `http://www.add-theme-projectID.us.magento.com/`.
113112

114113
You can put any subdomain before the dot and the route resolves. In this example, the route is defined as `http://*.{default}/`, so both of the following URLs work:
115114

116-
- `http://foo.add-theme-vmwklxcpbi6zq.us.magentosite.cloud/`
117-
- `http://bar.add-theme-vmwklxcpbi6zq.us.magentosite.cloud/`
115+
- `http://foo.add-theme-projectID.us.magentosite.cloud/`
116+
- `http://bar.add-theme-projectID.us.magentosite.cloud/`
118117

119118
If you examine the routes of this sample application, you see:
120119

121-
```
120+
```bash
122121
echo $MAGENTO_CLOUD_RELATIONSHIPS | base64 --decode | json_pp
123-
https://*.add-theme-vmwklxcpbi6zq.us.magentosite.cloud/
124122
```
125123

124+
```terminal
125+
https://*.add-theme-projectID.us.magentosite.cloud/
126+
```
127+
128+
{: .bs-callout .bs-callout-info}
129+
Some projects provisioned before December 8, 2017, use the triple dash (\-\-\-) as a separator for the subdomain.
130+
126131
See more information about [caching]({{ page.baseurl }}/cloud/project/project-routes-more-cache.html).
127132

128-
## Redirects {#cloud-yaml-routes-sample-redirects}
133+
## Redirects
129134

130135
As discussed in more detail in [Redirects]({{ page.baseurl }}/cloud/project/project-routes-more-redir.html), you can manage complex redirection rules, such as *partial redirects*:
131136

0 commit comments

Comments
 (0)