Goal
The web directive of .platform.app.yaml
is the developer’s chance to configure the Nginx server for the application. Sometimes it is helpful to see exactly what is in the Nginx configuration file as a result of the values in web
. This guide shows how to read the Nginx config file using the Platform.sh CLI tool.
Assumptions
This guide assumes:
- an active application on Platform.sh
- A local repository with the Platform.sh project as git remote
- The Platform.sh CLI installed locally
Problems
Reading the Nginx config file is a matter of being able to make an SSH connection to your environment and then knowing where the file is.
Steps
The nginx.conf
file can be read with this command:
platform ssh 'less /etc/nginx/nginx.conf'
Conclusion
Nginx configuration is abstracted into the web
directive of .platform.app.yaml
, but you can still see how that gets expressed by looking at the resultant file directly.