You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/spring-apps/how-to-enterprise-deploy-static-file.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,10 +85,10 @@ The [Paketo buildpacks samples](https://github.com/paketo-buildpacks/samples/tre
85
85
86
86
- Serving static files with a default server configuration file using `BP_WEB_SERVER` to select either [HTTPD](https://github.com/paketo-buildpacks/samples/blob/main/web-servers/no-config-file-sample/HTTPD.md) or [NGINX](https://github.com/paketo-buildpacks/samples/blob/main/web-servers/no-config-file-sample/NGINX.md).
87
87
- Using NPM to build a [React app](https://github.com/paketo-buildpacks/samples/tree/main/web-servers/javascript-frontend-sample) into static files that can be served by a web server. Use the following steps:
88
-
- Define a script under the `scripts` property of the package.json file that builds your production-ready static assets. For React, it's `build`.
89
-
- Find out where static assets are stored after the build script runs. For React, static assets are stored in `./build` by default.
90
-
- Set `BP_NODE_RUN_SCRIPTS` to the name of the build script.
91
-
- Set `BP_WEB_SERVER_ROOT` to the build output directory.
88
+
1. Define a script under the `scripts` property of the *package.json* file that builds your production-ready static assets. For React, it's `build`.
89
+
1. Find out where static assets are stored after the build script runs. For React, static assets are stored in `./build` by default.
90
+
1. Set `BP_NODE_RUN_SCRIPTS` to the name of the build script.
91
+
1. Set `BP_WEB_SERVER_ROOT` to the build output directory.
92
92
- Serving static files with your own server configuration file, using either [HTTPD](https://github.com/paketo-buildpacks/samples/tree/main/web-servers/httpd-sample) or [NGINX](https://github.com/paketo-buildpacks/samples/tree/main/web-servers/nginx-sample).
93
93
94
94
## Configure an auto-generated server configuration file
@@ -98,7 +98,7 @@ You can use environment variables to modify the auto-generated server configurat
98
98
| Environment Variable | Supported Value | Description |
|`BP_WEB_SERVER`|*nginx* or *httpd*| Specifies the web server type, either *nginx* for Nginx or *httpd* for Apache HTTP server. Required when using the auto-generated server configuration file. |
101
-
|`BP_WEB_SERVER_ROOT`| An absolute file path or a file path relative to `/workspace`| Sets the root directory for the static files. The default is `public`. |
101
+
|`BP_WEB_SERVER_ROOT`| An absolute file path or a file path relative to */workspace*.| Sets the root directory for the static files. The default is `public`. |
102
102
|`BP_WEB_SERVER_ENABLE_PUSH_STATE`|*true* or *false*| Enables push state routing for your application. Regardless of the route that is requested, *index.html* is always served. Useful for single-page web applications. |
103
103
|`BP_WEB_SERVER_FORCE_HTTPS`|*true* or *false*| Enforces HTTPS for server connections by redirecting all requests to use the HTTPS protocol. |
104
104
@@ -116,12 +116,12 @@ You can configure web server by using a customized server configuration file. Yo
| Listening port | Web server must listen on port 8080. The service checks the port on TCP for readiness and whether it's live. You must use the templated variable `PORT` in the configuration file. The appropriate port number is injected when the web server is launched. |`listen {{PORT}}`|`Listen "${PORT}"`|
118
118
| Log path | Config log path to the console. |`access_log /dev/stdout`, `error_log stderr`|`ErrorLog /proc/self/fd/2`|
119
-
| File path with write permission | Web server is granted write permission to the `/tmp` directory. Configuring the full path requires write permission under the `/tmp` directory. | For example: `client_body_temp_path /tmp/client_body_temp`||
119
+
| File path with write permission | Web server is granted write permission to the */tmp* directory. Configuring the full path requires write permission under the */tmp* directory. | For example: *client_body_temp_path /tmp/client_body_temp*||
120
120
| Maximum accepted body size of client request | Web server is behind the gateway. The maximum accepted body size of the client request is set to 500m in the gateway and the value for web server must be less than 500m. |`client_max_body_size` should be less than 500m. |`LimitRequestBody` should be less than 500m. |
121
121
122
122
## Buildpack bindings
123
123
124
-
Deploying static files to Azure Spring Apps Enterprise tier supports the Dynatrace buildpack binding. The htpasswd buildpack binding isn't supported.
124
+
Deploying static files to Azure Spring Apps Enterprise tier supports the Dynatrace buildpack binding. The `htpasswd` buildpack binding isn't supported.
125
125
126
126
For more information, see the [Buildpack bindings](how-to-enterprise-build-service.md#buildpack-bindings) section of [Use Tanzu Build Service](how-to-enterprise-build-service.md).
127
127
@@ -137,10 +137,10 @@ The root cause of these errors is that the web server type isn't specified. To r
137
137
138
138
The following table describes common deployment errors when you deploy static files to Azure Spring Apps Enterprise tier.
|*112404: Exit code 0: purposely stopped, please refer to `https://aka.ms/exitcode`*| The web server failed to start. | Validate your server configuration file to see if there's a configuration error. Then check whether your configuration file conforms to the restrictions described in [Using a customized server configuration file](#using-a-customized-server-configuration-file). |
143
-
|*mkdir() "/var/client_body_temp" failed (13: Permission denied)*| The web server doesn't have write permission to the specified path. | Configure the path under the directory `/tmp`; for example: `/tmp/client_body_temp`. |
142
+
|*112404: Exit code 0: purposely stopped, please refer to `https://aka.ms/exitcode`*| The web server failed to start. | Validate your server configuration file to see if there's a configuration error. Then, check whether your configuration file conforms to the restrictions described in the [Using a customized server configuration file](#using-a-customized-server-configuration-file) section. |
143
+
|*mkdir() "/var/client_body_temp" failed (13: Permission denied)*| The web server doesn't have write permission to the specified path. | Configure the path under the directory */tmp*; for example: */tmp/client_body_temp*. |
0 commit comments