From 08d978858ba0f05bed0660126d5cccab33936b42 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 31 Jul 2019 19:14:47 +0300 Subject: [PATCH] Feat(apache): Setup default host --- .../roles/apache/files/_default_/favicon.ico | Bin 0 -> 3638 bytes .../roles/apache/files/_default_/index.html | 13 +++++++++++++ .../roles/apache/files/_default_/nothing.html | 10 ++++++++++ .../roles/apache/files/_default_/robots.txt | 2 ++ playbooks/debian/roles/apache/tasks/main.yml | 9 +++++++++ .../debian/roles/apache/templates/001-phd.conf | 8 ++++---- 6 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 playbooks/debian/roles/apache/files/_default_/favicon.ico create mode 100644 playbooks/debian/roles/apache/files/_default_/index.html create mode 100644 playbooks/debian/roles/apache/files/_default_/nothing.html create mode 100644 playbooks/debian/roles/apache/files/_default_/robots.txt diff --git a/playbooks/debian/roles/apache/files/_default_/favicon.ico b/playbooks/debian/roles/apache/files/_default_/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..eee667c7824e9def92ed5b1e60c0ccf33d70f069 GIT binary patch literal 3638 zcmeHKX;4#F6#hcOzJ#q1QYly$pj2fiw6-K|iLDg{+fd39%NArYU@9SCNWxMULA21S zl+t3QEt^HdV!#QGyNgo%zf{k^PO|w zednHc?tK6SCa|}M2D?px^`z(NIWMYcT1^2_60j+no6%)%ZVrWog%}wb zflw&K%At5|qlqSAx9&hA%~U}$Iv;cPZMJUr0c+zkG% zUHJXazcBIhFUZNsf!`)SbevX_8c#>{p~IM&nE{W-gSWRASgcTp^Ch@>^Crf}$B~|% zj@H&zSXfx#%9Sf9FE0nf)dhWhec*Dp;NioExPJXQ2EQLieSJMH{dNr(FJ8orscB69 zaRYI2aga)-NJ>oujYh-$`}c9@&K(R43_z(=A}cEkqobp!I8Y618yf@#2BLrH9Gsk; zQCwV%@gFZiDB1@mlZmFLCe+l_KzT+5kw}E3q$FhR5ke}HgCrHq%*^ok@nhK9*ynj!fX9H1P2ErB_#zZf^_5;6hc~327iBlgoTBnQ`v((dqp@;i;D{`{dyH*u^1AG1W%qk0ZA4-dh`e+iSXdT1DKne&uxNzYDLPA0?Ha3Q#AI@v`QZ|Q!;o)Hn438ipf{VeyLG<_c zqqnyg-QC@YiHSk`sndv$k4IZu8xj)}k(`_ifk1%F>}<_moSU1Ay1F`4R@b1Ys0bAm z6_CkfD3U9nP$*DVRt8g3Q&?JB!rIyzc62(NoSfk5>I$Zt8!lhH1|M&41P28nG&B@p zEEdAU!@=kCk(wqzo;V+3Ndft^OkhcJ$cC)39a$eb8ONR+G8`S9;7rz<$#f&{HBRzq zjI7fL{Qdk9NOFNi#_UvfgH7_8%jJ@>B*-KAxq^QeflQvLgTdjD=XWlA)jIsP_Uwl5f;x`sSn2ZAt+}>Ep$Tz4DN6>re6fA* zv*x?Lc$>B=`pjp32tB@q2P8Yx zlnYM3>wb!@G0@|y8i+1cr-s zeD(Z`?DE%ohKrY-zvlhVJTE^Rz|cHfebJqtI)1bdOuVfZy$$&F3>@`;eaV^l>#iU5 zqs3vDI!o)HAv^GS!!aR8c&vd``~|Q!ZYbRytInUjS<;=aR2gFX>d4C4L=GD3=oxNO zDk+Wn*tF)&RZJBFT`y%&UVB6LD4^}{aW1Uxz{zwE-z|G1jN$v?zP!yR!8norPV^CD iL`NTCe%jANCPNg{xIDVLc$px3zxt<2{Rj5Hw7&tKSyhDq literal 0 HcmV?d00001 diff --git a/playbooks/debian/roles/apache/files/_default_/index.html b/playbooks/debian/roles/apache/files/_default_/index.html new file mode 100644 index 0000000..2d1cc54 --- /dev/null +++ b/playbooks/debian/roles/apache/files/_default_/index.html @@ -0,0 +1,13 @@ + + + Index + + + + +

+ nothing +

+ + + diff --git a/playbooks/debian/roles/apache/files/_default_/nothing.html b/playbooks/debian/roles/apache/files/_default_/nothing.html new file mode 100644 index 0000000..f5c45e5 --- /dev/null +++ b/playbooks/debian/roles/apache/files/_default_/nothing.html @@ -0,0 +1,10 @@ + +Nothing here + + +This page was intentionally left blank. + + + + + diff --git a/playbooks/debian/roles/apache/files/_default_/robots.txt b/playbooks/debian/roles/apache/files/_default_/robots.txt new file mode 100644 index 0000000..1b425ee --- /dev/null +++ b/playbooks/debian/roles/apache/files/_default_/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: /cgi-bin/ diff --git a/playbooks/debian/roles/apache/tasks/main.yml b/playbooks/debian/roles/apache/tasks/main.yml index c05eb6f..ebe880c 100644 --- a/playbooks/debian/roles/apache/tasks/main.yml +++ b/playbooks/debian/roles/apache/tasks/main.yml @@ -35,6 +35,15 @@ mode: '0640' force: no + - name: Setup default host + become: true + copy: + src: _default_ + dest: /usr/local/apache2 + owner: root + group: www-data + mode: '0644' + - name: Enable config become: true command: a2enconf 001-phd diff --git a/playbooks/debian/roles/apache/templates/001-phd.conf b/playbooks/debian/roles/apache/templates/001-phd.conf index a95b039..f4a91fb 100644 --- a/playbooks/debian/roles/apache/templates/001-phd.conf +++ b/playbooks/debian/roles/apache/templates/001-phd.conf @@ -110,19 +110,19 @@ ErrorDocument 404 /~phd/Bookmarks/notfound.html ServerName unknown.invalid -DocumentRoot /home/phd/Internet/WWW/htdocs/_default_/ +DocumentRoot /usr/local/apache2/_default_/ ErrorDocument 404 /nothing.html - + Require all granted -DocumentRoot /home/phd/Internet/WWW/htdocs/_default_/ +DocumentRoot /usr/local/apache2/_default_/ ErrorDocument 404 /nothing.html - + Require all granted -- 2.39.5