Add tutorial for nginx

This commit is contained in:
Felix Niederwanger 2021-05-05 15:41:33 +02:00
parent 85e11c2c0e
commit c70e25961d
Signed by: phoenix
GPG key ID: 31860289A704FB3C
3 changed files with 44 additions and 7 deletions

View file

@ -11,4 +11,11 @@ GeekOops was started in [SUSE Hackweek 2021](https://hackweek.suse.com/20/projec
## Getting started
Checkout the [example webserver post](/posts/20210326-example-webserver/) for a quick tutorial about how to the GeekOops roles to setup a simple `nginx`+`php-fpm` webserver on openSUSE Leap.
Checkout the [nginx tutorial post](/posts/20210505-tutorial-nginx) for a basic step-by-step guide. A more how-to is the [example webserver post](/posts/20210326-example-webserver/), where the procedure for setting up a simple `nginx`+`php-fpm` webserver on openSUSE Leap is shown.
# Roles
* [Ansible nginx](/posts/20210326-nginx/)
* [Ansible php-fpm](/posts/20210326-php-fpm/)
* [Ansible PureFTPd](/posts/20210326-pureftpd/)
* [Ansible NEXT](/posts/20210326-next/) (PXE boot server)

View file

@ -0,0 +1,24 @@
---
title: "Ansible nginx"
author: "phoenix"
date: 2021-03-26T09:27:50+01:00
---
The [geekoops-nginx role](https://github.com/GeekOops/geekoops-nginx) is a simple Ansible role to install and setup `nginx` on a openSUSE Leap server. This is the first role of the project and kept as simple as possible: It installs `nginx` and optionally opens the firewall ports.
# Example
```yaml
---
# Example playbook for nginx on jellyfish
- hosts: jellyfish
user: root
roles:
- role: geekoops-nginx
vars:
setup_default_page: true
default_page_hostname: "{{ansible_host}}"
config_firewall: true
firewall_zone: "public"
```

View file

@ -1,11 +1,15 @@
---
title: "Ansible nginx"
title: "Tutorial: nginx"
author: "phoenix"
date: 2021-03-26T09:27:50+01:00
---
Welcome to GeekOops! This is my first role of the project. The role is as simple as it suggests. It installs `nginx` and optionally opens the firewall ports.
date: 2021-05-05T13:35:03+02:00
tags:
- tutorial
- nginx
# Usage example
---
Welcome to GeekOops! This post acts as a tutorial to start with the first role of this project: Installing and configuring a `nginx` webserver via the [geekoops-nginx role](https://github.com/GeekOops/geekoops-nginx).
# Tutorial
Let's assume we want to roll this role out on our imaginary `jellyfish` server. We need to have root `ssh` access to `jellyfish`. Ansible also supports `sudo`, but this is not covered here. So first make sure you can do the following
@ -45,4 +49,6 @@ Ok, when you have done that, then we're ready to rock. Run `ansible-playbook` wi
ansible-playbook -i inventory jellyfish.yml
Ansible now runs the playbook, `nginx` will be installed and the firewall will open the http (80) and https (443) port for you on the "public" zone.
Ansible now runs the playbook, `nginx` will be installed and the firewall will open the http (80) and https (443) port for you on the "public" zone.
Done!