This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find /var/www/yourdomain.com/html/ -type d -exec chmod 755 {} \; | |
| find /var/www/yourdomain.com/html/ -type f -exec chmod 644 {} \; | |
| sudo chown -hR www-data:www-data /var/www/yourdomain.com/html/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Cria uma partição (swapfile) na raiz do sistema e ativa em seguida | |
| fallocate -l 1G /swapfile | |
| chmod 600 /swapfile | |
| mkswap /swapfile | |
| swapon /swapfile | |
| # Editar o arquivo /etc/fstab e adicionar a linha abaixo | |
| /swapfile none swap sw 0 0 | |
| # Confirme se deu certo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Configurações de desempenho do PHP | |
| # /etc/php/VERSAO_PHP/fpm/php.ini | |
| max_execution_time = 180 | |
| max_input_time = 180 | |
| memory_limit = 256M | |
| post_max_size = 128M | |
| cgi.fix_pathinfo = 0 | |
| upload_max_filesize = 128M | |
| max_file_uploads = 128 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <title>Aqui vai o titulo da página</title> | |
| <meta name="description" content="Descrição do seu site" /> | |
| <meta name="author" content="Author so Site" /> | |
| <meta name="robots" content="index, follow"> | |
| <link rel="base" href="https://www.meusite.com.br" /> | |
| <link rel="canonical" href="https://www.meusite.com.br" /> | |
| <link rel="sitemap" type="application/xml" href="https://www.meusite.com.br/sitemap.xml" /> | |
| <link rel="author" href="https://plus.google.com/+SuaPaginaGooglePlus/posts" /> | |
| <link rel="publisher" href="https://plus.google.com/+SuaPaginaGooglePlus" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apt-get update | |
| apt-get install ca-certificates -y | |
| echo "deb http://packages.dotdeb.org jessie all" >> /etc/apt/sources.list | |
| echo "deb-src http://packages.dotdeb.org jessie all" >> /etc/apt/sources.list | |
| echo "deb http://mirror.edatel.net.co/mariadb/repo/10.1/debian jessie main" >> /etc/apt/sources.list | |
| echo "deb-src http://mirror.edatel.net.co/mariadb/repo/10.1/debian jessie main" >> /etc/apt/sources.list | |
| wget https://www.dotdeb.org/dotdeb.gpg | |
| apt-key add dotdeb.gpg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Painel ISPConfig 3 | |
| ## Adicionar diretivas para usuario em Jail executar comando como GIT, PHP e Composer | |
| # /etc/jailkit/jk_init.ini | |
| # [GIT] | |
| # Já vem como padrão no arquivo | |
| [php] | |
| comment = the php interpreter | |
| executables = /usr/bin/php, /usr/bin/php5, /usr/bin/php7.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MY_IP=0.0.0.0 | |
| # Create the ipset list | |
| ipset -N china hash:net | |
| ipset -N tor iphash | |
| # remove any old list that might exist from previous runs of this script | |
| rm cn.zone | |
| rm tor.zone | |
| # Pull the latest IP set for China and Tor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| location = /robots.txt { | |
| root {DOCROOT}public; | |
| access_log off; | |
| log_not_found off; | |
| allow all; | |
| } | |
| location / { | |
| root {DOCROOT}public; | |
| try_files $uri $uri/ /index.php?q=$uri&$args; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Auth filter /etc/fail2ban/filter.d/nginx-auth.conf: | |
| # | |
| # Blocks IPs that makes too much accesses to the server | |
| # | |
| [Definition] | |
| failregex = ^<HOST> -.*"(GET|POST).*HTTP.*" | |
| ignoreregex = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Após instalar o MariaDB você consiga entrar no banco de dados sem senha ou mesmo digitando qualquer senha ele entra, faça os passos a seguir para resolver esse problema. | |
| 1 - Conectar no banco: | |
| sudo mysql -u root | |
| 2 - Consultar usuário cadastrados na tabela user | |
| SELECT user, host FROM mysql.user; | |
| +------------------+-----------+ | |
| | User | Host | |