Example: Run Nginx Web Server in Gitpod.io
Nginx is included in Gitpod's workspace-full docker image. This example shows how to interact with Nginx and how to configure Nginx. Configuration is optionl, since a default configuration is included in workspace-full.
Try or Contribute
open https://gitpod.io#https://github.com/gitpod-io/nginx-example
In this Example:
- optional: custom nginx.conf.
- optional: set www-root via NGINX_DOCROOT_IN_REPO via Dockerfile (you don't want a custom nginx.conf).
- follow the Nginx logs in the Gitpod Terminal View via multitail (see .gitpod.yaml).
Terminal Commands to try
nginx- start Nginx (it's started automatically on workspace launch)nginx -s stop- stop Nginxnginx -s reload- reload Nginx configgp open /etc/nginx/nginx.conf- Open nginx.conf in Gitpod editorgp open /var/log/nginx/access.log- Open access.log in Gitpod editorgp open /var/log/nginx/error.log- Open error.log in Gitpod editormultitail /var/log/nginx/access.log -I /var/log/nginx/error.log- View and follow logs in Terminal