Add configuration for primary vds
This commit is contained in:
14
ansible/roles/site-s2photo/tasks/main.yml
Executable file
14
ansible/roles/site-s2photo/tasks/main.yml
Executable file
@ -0,0 +1,14 @@
|
||||
---
|
||||
- name: Create nginx config
|
||||
template:
|
||||
src: site.conf.j2
|
||||
dest: /etc/nginx/sites-enabled/s2photo.conf
|
||||
notify: restart nginx
|
||||
|
||||
- name: Create root folder
|
||||
file:
|
||||
path: /var/www/s2photo
|
||||
state: directory
|
||||
owner: deployer
|
||||
group: deployer
|
||||
mode: u=rw,g=r,o=r
|
10
ansible/roles/site-s2photo/templates/site.conf.j2
Executable file
10
ansible/roles/site-s2photo/templates/site.conf.j2
Executable file
@ -0,0 +1,10 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name s2photo.ru www.s2photo.ru;
|
||||
|
||||
location / {
|
||||
root /var/www/s2photo/current;
|
||||
index index.html;
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user