mirror of
https://github.com/koodiklinikka/koodiklinikka.fi.git
synced 2026-02-12 10:51:56 +00:00
change nginx config to be just a location block
This commit is contained in:
@@ -37,20 +37,13 @@
|
||||
remote_user: "{{ service_user }}"
|
||||
template: >
|
||||
src=templates/nginx.j2
|
||||
dest="/etc/nginx/sites-available/{{ public_hostname }}"
|
||||
dest="/etc/nginx/sites-available/koodiklinikka/{{ public_hostname }}"
|
||||
mode=664
|
||||
notify: restart nginx
|
||||
|
||||
- name: Enable nginx vhost
|
||||
remote_user: "{{ service_user }}"
|
||||
file: >
|
||||
state=link
|
||||
src=/etc/nginx/sites-available/{{ public_hostname }}
|
||||
dest=/etc/nginx/sites-enabled/{{ public_hostname }}
|
||||
notify: restart nginx
|
||||
|
||||
handlers:
|
||||
- name: restart nginx
|
||||
sudo: true
|
||||
remote_user: "{{ service_user }}"
|
||||
service: >
|
||||
name=nginx
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name {{ public_hostname }};
|
||||
|
||||
location / {
|
||||
root {{ projects_path }}/public;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.html;
|
||||
gzip_static on;
|
||||
gzip_http_version 1.1;
|
||||
gzip_proxied expired no-cache no-store private auth;
|
||||
gzip_disable "MSIE [1-6]\.";
|
||||
gzip_vary on;
|
||||
}
|
||||
try_files $uri /index.html;
|
||||
gzip_static on;
|
||||
gzip_http_version 1.1;
|
||||
gzip_proxied expired no-cache no-store private auth;
|
||||
gzip_disable "MSIE [1-6]\.";
|
||||
gzip_vary on;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user