Add Nginx setup task and config file

master
Dylan DiGeronimo 2020-01-10 19:04:00 -05:00
parent ad28ce8e96
commit 6ee3de58af
2 changed files with 20 additions and 2 deletions

View File

@ -0,0 +1,9 @@
server {
listen 80;
server_name cce.ebookfoundation.org;
access_log /var/log/nginx/cce-search.log;
location / {
proxy_pass http://127.0.0.1:8000;
}
}

View File

@ -58,7 +58,7 @@
- name: Enable UFW
ufw:
state: enabled
policy: disallow
policy: disallow # By default, we disallow all connections other than those we specifically allow
- name: UFW logging on
ufw:
@ -86,7 +86,16 @@
port: 443
proto: tcp
# TODO: Copy two Nginx config files (general file and specific app file, must copy to repo from server)
- name: Copy Nginx config
become: yes
copy:
src: cce-search.conf
dest: /etc/nginx/conf.d/cce-search,conf
owner: "{{ user_name }}"
group: "{{ user_name }}"
mode: 0755
# TODO: Enable Nginx