summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Porte <microjoe@microjoe.org>2019-10-10 19:05:23 +0200
committerRomain Porte <microjoe@microjoe.org>2019-10-10 19:06:47 +0200
commit1b0b45661810b5b6a6a1aac305856d4834572e79 (patch)
tree3e801c7f1c27dc38265adaf206e77c9ac90586dc
parent932929d7e9c98c289943f3301b996e4bfcb68603 (diff)
downloadMicroJoe.nginx-1b0b45661810b5b6a6a1aac305856d4834572e79.tar.gz
MicroJoe.nginx-1b0b45661810b5b6a6a1aac305856d4834572e79.zip
do not install nginx.conf, update apt command
-rw-r--r--files/nginx.conf88
-rw-r--r--tasks/main.yml22
2 files changed, 8 insertions, 102 deletions
diff --git a/files/nginx.conf b/files/nginx.conf
deleted file mode 100644
index f55097a..0000000
--- a/files/nginx.conf
+++ /dev/null
@@ -1,88 +0,0 @@
-user www-data;
-worker_processes 4;
-pid /run/nginx.pid;
-
-events {
- worker_connections 768;
- # multi_accept on;
-}
-
-http {
-
- ##
- # Basic Settings
- ##
-
- sendfile on;
- tcp_nopush on;
- tcp_nodelay on;
- keepalive_timeout 65;
- types_hash_max_size 2048;
- server_tokens off;
-
- server_names_hash_bucket_size 128;
- # server_name_in_redirect off;
-
- include /etc/nginx/mime.types;
- default_type application/octet-stream;
-
- ##
- # SSL Settings
- ##
-
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
- ssl_prefer_server_ciphers on;
-
- ssl_dhparam /etc/nginx/dhparam4096.pem; # openssl dhparam -out dhparam4096.pem 4096
- ssl_ecdh_curve secp384r1;
-
- ##
- # Logging Settings
- ##
-
- access_log /var/log/nginx/access.log;
- error_log /var/log/nginx/error.log;
-
- ##
- # Gzip Settings
- ##
-
- gzip on;
- gzip_disable "msie6";
-
- # gzip_vary on;
- # gzip_proxied any;
- # gzip_comp_level 6;
- # gzip_buffers 16 8k;
- # gzip_http_version 1.1;
- # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
-
- ##
- # Virtual Host Configs
- ##
-
- include /etc/nginx/conf.d/*.conf;
- include /etc/nginx/sites-enabled/*;
-}
-
-
-#mail {
-# # See sample authentication script at:
-# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
-#
-# # auth_http localhost/auth.php;
-# # pop3_capabilities "TOP" "USER";
-# # imap_capabilities "IMAP4rev1" "UIDPLUS";
-#
-# server {
-# listen localhost:110;
-# protocol pop3;
-# proxy on;
-# }
-#
-# server {
-# listen localhost:143;
-# protocol imap;
-# proxy on;
-# }
-#}
diff --git a/tasks/main.yml b/tasks/main.yml
index 08401a1..7411ca5 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -3,23 +3,17 @@
- name: Install nginx and dependencies
apt:
- name: "{{ item }}"
+ name:
+ - nginx
+ - php-cli
+ - php-fpm
+ - php-gd
+ - php-intl
+ - php-xml
state: present
with_items:
- - nginx
- - php-cli
- - php-fpm
- - php-gd
- - php-intl
- - php-xml
-- name: Install nginx config
- copy:
- src: files/nginx.conf
- dest: /etc/nginx/nginx.conf
- notify: restart nginx
-
-- name: Install snippets
+- name: Install nginx snippets
copy:
src: files/ssl.conf
dest: /etc/nginx/snippets/ssl.conf