Correctly rig up the Nginx part of deployment.

This commit is contained in:
Luke Murphy 2018-11-18 19:00:57 +01:00
parent 4d6d761915
commit f0e6aaa32e
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
3 changed files with 17 additions and 1 deletions

View File

@ -4,6 +4,13 @@
become: true
template:
src: books.vvvvvvaria.org.j2
dest: /etc/nginx/sites-available/
dest: /etc/nginx/sites-available/books.vvvvvvaria.conf
mode: 0644
notify: Reload Nginx.
- name: Symlink the configuration into the enabled folder.
become: true
file:
src: /etc/nginx/sites-available/books.vvvvvvaria.conf
path: /etc/nginx/sites-enabled/books.vvvvvvaria.conf
state: link

View File

@ -18,6 +18,9 @@ server {
error_log /var/log/nginx/books.vvvvvvaria.org.log;
location / {
auth_basic "Congrats! You've reached a members only portion of the site!";
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_bind $server_addr;
proxy_pass http://127.0.0.1:5000;
proxy_set_header Host $http_host;

View File

@ -26,3 +26,9 @@
name: supervisor
state: started
enabled: true
- name: Ensure the XPPL group is running.
become: true
supervisorctl:
name: 'xppl:'
state: started