From f008b2be84307bc1e5c15e8156d282ce7a7795fb Mon Sep 17 00:00:00 2001 From: ServerOk Date: Fri, 25 Sep 2020 23:04:46 +0530 Subject: [PATCH] updated --- ansible/.gitignore | 2 +- ansible/readme.txt | 2 +- ansible/ubuntu-20-apache.yaml | 6 ++++-- ansible/update-cpanel-servers.yml | 2 ++ centos/readme-apache.txt | 2 +- install/phpmyadmin.sh | 4 ++-- tools/fix-yum | 3 ++- ubuntu/2-nginx-php74-mysql.sh | 2 +- 8 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ansible/.gitignore b/ansible/.gitignore index 763c73f..79fdf27 100644 --- a/ansible/.gitignore +++ b/ansible/.gitignore @@ -3,4 +3,4 @@ 1.yaml servers.txt inventory -test.yaml +test.yml diff --git a/ansible/readme.txt b/ansible/readme.txt index 52fb5a6..5518d9a 100644 --- a/ansible/readme.txt +++ b/ansible/readme.txt @@ -6,4 +6,4 @@ phpMyAdmin install on nginx debian/Ubuntu ansible-playbook -i servers.txt phpmyadmin.yaml - +ansible-playbook -i inventory/cpanel-servers.txt update-cpanel-servers.yml diff --git a/ansible/ubuntu-20-apache.yaml b/ansible/ubuntu-20-apache.yaml index a75d3b3..c960a38 100644 --- a/ansible/ubuntu-20-apache.yaml +++ b/ansible/ubuntu-20-apache.yaml @@ -60,6 +60,8 @@ - libapache2-mod-php7.3 - name: enable apache modules command: a2enmod rewrite ssl php7.3 + - name: disable mod_autoindex + command: a2dismod autoindex -f - name: enable apache2 service systemd: name: apache2 @@ -68,7 +70,7 @@ - name: install mysql server apt: pkg: - - mysql-server + - mariadb-server - name: enable mysql server systemd: name: mysql @@ -93,4 +95,4 @@ - name: install automysqlbackup apt: name: automysqlbackup - state: present \ No newline at end of file + state: present diff --git a/ansible/update-cpanel-servers.yml b/ansible/update-cpanel-servers.yml index 3beaac9..35a0e4e 100644 --- a/ansible/update-cpanel-servers.yml +++ b/ansible/update-cpanel-servers.yml @@ -4,3 +4,5 @@ tasks: - name: update system yum: name=* state=latest + - name: update cpanel + command: /scripts/upcp diff --git a/centos/readme-apache.txt b/centos/readme-apache.txt index 8f95dea..58067d8 100644 --- a/centos/readme-apache.txt +++ b/centos/readme-apache.txt @@ -25,7 +25,7 @@ vi /etc/httpd/conf.d/DOMAIN_NAME.conf ServerAdmin info@DOMAIN_NAME DocumentRoot /home/DOMAIN_NAME/html - Options All + Options All -Indexes AllowOverride All Require all granted Order allow,deny diff --git a/install/phpmyadmin.sh b/install/phpmyadmin.sh index 312bc9f..bfcedd4 100644 --- a/install/phpmyadmin.sh +++ b/install/phpmyadmin.sh @@ -131,9 +131,9 @@ server { vi /etc/apache2/conf-enabled/phpmyadmin.conf -Listen 8080 +Listen 7777 - + DocumentRoot /usr/serverok/phpmyadmin/ CustomLog ${APACHE_LOG_DIR}/pma.log combined diff --git a/tools/fix-yum b/tools/fix-yum index 91be99e..6c7fdf0 100755 --- a/tools/fix-yum +++ b/tools/fix-yum @@ -1,5 +1,6 @@ #!/usr/bin/python -# https://blog.hostonnet.com/python-script-to-update-yum +# Author: Yujin Boby +# Web: https://serverok.in import subprocess import os diff --git a/ubuntu/2-nginx-php74-mysql.sh b/ubuntu/2-nginx-php74-mysql.sh index 502fc6a..2eefed1 100644 --- a/ubuntu/2-nginx-php74-mysql.sh +++ b/ubuntu/2-nginx-php74-mysql.sh @@ -1,6 +1,6 @@ #!/bin/bash # Author: admin@serverOk.in -# Web: https://www.serverok.in +# Web: https://serverok.in apt install -y software-properties-common