Add nginx role for ansible, example playbooks
This commit is contained in:
parent
424f9b237c
commit
7f2c2e4f65
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
- hosts: plumbi
|
||||||
|
become: yes
|
||||||
|
roles:
|
||||||
|
- fail2ban
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- hosts: nginx-server
|
- hosts: plumbi
|
||||||
become: yes
|
become: yes
|
||||||
roles:
|
roles:
|
||||||
- nginx
|
- nginx
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1,25 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Welcome to nginx!</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
width: 35em;
|
||||||
|
margin: 0 auto;
|
||||||
|
font-family: Tahoma, Verdana, Arial, sans-serif;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Klips!</h1>
|
||||||
|
<p>If you see this page, the nginx web server is successfully installed and
|
||||||
|
working. Further configuration is required.</p>
|
||||||
|
|
||||||
|
<p>For online documentation and support please refer to
|
||||||
|
<a href="http://nginx.org/">nginx.org</a>.<br/>
|
||||||
|
Commercial support is available at
|
||||||
|
<a href="http://nginx.com/">nginx.com</a>.</p>
|
||||||
|
|
||||||
|
<p><em>Thank you for using nginx.</em></p>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,55 @@
|
||||||
|
user www-data;
|
||||||
|
worker_processes auto;
|
||||||
|
pid /run/nginx.pid;
|
||||||
|
|
||||||
|
events { }
|
||||||
|
|
||||||
|
http {
|
||||||
|
include mime.types;
|
||||||
|
|
||||||
|
# Basic Server Configuration
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_tokens off;
|
||||||
|
server_name {{ domain_name }};
|
||||||
|
|
||||||
|
location / {
|
||||||
|
root {{ nginx_root_dir }};
|
||||||
|
index {{ index_files }};
|
||||||
|
}
|
||||||
|
|
||||||
|
# Uncomment to pass for SSL
|
||||||
|
#return 301 https://$host$request_uri;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Terminate SSL and route traffic
|
||||||
|
# server {
|
||||||
|
# server_name localhost;
|
||||||
|
# server_tokens off;
|
||||||
|
#
|
||||||
|
# SSL Settings
|
||||||
|
# listen 443 ssl;
|
||||||
|
# ssl_certificate /etc/letsencrypt/live/www.domain.com/fullchain.pem;
|
||||||
|
# ssl_certificate_key /etc/letsencrypt/live/www.domain.com/privkey.pem;
|
||||||
|
# include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||||
|
# ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||||
|
|
||||||
|
# location / {
|
||||||
|
# include proxy_params;
|
||||||
|
# proxy_pass http://0.0.0.0:8080/;
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
|
||||||
|
# Private subdomain for routing custom ssh port
|
||||||
|
# server {
|
||||||
|
# server_name sub.domain.com;
|
||||||
|
# server_tokens off;
|
||||||
|
#
|
||||||
|
# location / {
|
||||||
|
# include proxy_params;
|
||||||
|
# proxy_pass http://0.0.0.0:3333;
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
#}
|
||||||
|
|
Loading…
Reference in New Issue