@ -0,0 +1,2 @@ | |||||
--- | |||||
webserver_name: nginx |
@ -1,36 +0,0 @@ | |||||
server { | |||||
listen 80; | |||||
listen [::]:80; | |||||
server_name wiki.domain.example; | |||||
return 301 https://$server_name$request_uri; | |||||
} | |||||
server { | |||||
listen [::]:443 ssl; | |||||
listen 443 ssl; | |||||
client_max_body_size 4M; | |||||
client_body_buffer_size 128k; | |||||
root /usr/share/dokuwiki; | |||||
index doku.php; | |||||
location ~ /(data/|conf/|bin/|inc/|install.php) { deny all; } | |||||
location / { try_files $uri $uri/ @dokuwiki; } | |||||
location @dokuwiki { | |||||
rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last; | |||||
rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last; | |||||
rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last; | |||||
rewrite ^/(.*) /doku.php?id=$1&$args last; | |||||
} | |||||
location ~ \.php$ { | |||||
try_files $uri $uri/ /doku.php; | |||||
include fastcgi_params; | |||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |||||
fastcgi_param REDIRECT_STATUS 200; | |||||
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; | |||||
} | |||||
} |
@ -1,28 +1 @@ | |||||
server { | |||||
listen *:80; | |||||
server_name login.lilik.it; | |||||
client_max_body_size 0; | |||||
location / { | |||||
rewrite ^/$ /static/index.html permanent; | rewrite ^/$ /static/index.html permanent; | ||||
proxy_http_version 1.1; | |||||
proxy_set_header Host projects.leader.lilik.it; | |||||
proxy_set_header X-Forwarded-Host ""; | |||||
proxy_set_header X-Real-IP $remote_addr; | |||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |||||
proxy_set_header X-Forwarded-Proto http; | |||||
proxy_pass http://localhost:5000; | |||||
proxy_hide_header Content-Security-Policy; | |||||
proxy_hide_header X-Frame-Options; | |||||
} | |||||
} |
@ -1,4 +1,4 @@ | |||||
--- | --- | ||||
is_proxy: false | is_proxy: false | ||||
php: false | php: false | ||||
config_names: [] | |||||
config_name: null |
@ -0,0 +1,3 @@ | |||||
--- | |||||
dependencies: | |||||
- role: certbot |
@ -0,0 +1,11 @@ | |||||
location / { | |||||
client_max_body_size 50M; | |||||
proxy_set_header Upgrade $http_upgrade; | |||||
proxy_set_header Connection "upgrade"; | |||||
proxy_set_header Host $http_host; | |||||
proxy_set_header X-Real-IP $remote_addr; | |||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |||||
proxy_set_header X-Forwarded-Proto $scheme; | |||||
proxy_set_header X-Frame-Options SAMEORIGIN; | |||||
proxy_pass {{ remote_host }}; | |||||
} |
@ -1,6 +1,8 @@ | |||||
--- | --- | ||||
dependencies: | dependencies: | ||||
- role: nginx | - role: nginx | ||||
config_name: "sympa" | |||||
server_fqdn: "lists.lilik.it" | |||||
parent_role_path: "sympa" | parent_role_path: "sympa" | ||||
- role: exim4 | - role: exim4 | ||||
stmp_relay: "{{ hostvars['mail'].ansible_host }}" | stmp_relay: "{{ hostvars['mail'].ansible_host }}" | ||||
@ -1,6 +1,8 @@ | |||||
--- | --- | ||||
dependencies: | dependencies: | ||||
- role: apache2 | |||||
- role: nginx | |||||
php: true | php: true | ||||
parent_role_path: "wordpress" | parent_role_path: "wordpress" | ||||
config_name: "wordpress" | |||||
server_fqdn: "blog.lilik.it" | |||||
- role: mysql | - role: mysql |
@ -1,11 +0,0 @@ | |||||
<VirtualHost *:80> | |||||
ServerName {{ item }}.lilik.it | |||||
DocumentRoot /usr/share/wordpress | |||||
DirectoryIndex index.php | |||||
Alias /wp-content/ "/srv/www/wp-content/{{ item }}.lilik.it/" | |||||
<Directory /usr/share/wordpress> | |||||
AllowOverride All | |||||
Order Deny,Allow | |||||
Allow from all | |||||
</Directory> | |||||
</VirtualHost> |
@ -0,0 +1,28 @@ | |||||
root /usr/share/wordpress; | |||||
index index.php; | |||||
location /wp-content/ { | |||||
alias /srv/www/wp-content/$host/; | |||||
} | |||||
location ~ \.php$ { | |||||
include snippets/fastcgi-php.conf; | |||||
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; | |||||
} | |||||
#deny access to .htaccess files, if Apache's document root | |||||
#concurs with nginx's one | |||||
location ~ /\.ht { | |||||
deny all; | |||||
} | |||||
location /files { | |||||
rewrite ^/files/(.+) /wp-includes/ms-files.php?file=$1 break; | |||||
} | |||||
location / { | |||||
if (-e $request_filename){ | |||||
rewrite ^(.*)$ /index.php break; | |||||
} | |||||
} |