This file contains 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
## Criar database | |
CREATE DATABASE name_database CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | |
## Criar usuario | |
CREATE USER 'userbd'@'localhost' IDENTIFIED BY 'password'; | |
## Adicionando privelegios | |
GRANT ALL PRIVILEGES ON name_database.* TO 'userbd'@'localhost'; | |
## Listar usuários criados e seus respectivos bancos |
This file contains 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
### ------------------ | |
### Debian 8 "Jessie" | |
### ------------------ | |
deb http://http.debian.net/debian/ jessie main contrib non-free | |
deb-src http://http.debian.net/debian/ jessie main contrib non-free | |
### ----------------------------------- | |
### Debian 8 Jessie Security "Updates" |
This file contains 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
#------------------------------------------------------------------------------# | |
# OFFICIAL DEBIAN REPOS | |
#------------------------------------------------------------------------------# | |
###### Debian Main Repos | |
deb http://deb.debian.org/debian/ stable main contrib non-free | |
deb-src http://deb.debian.org/debian/ stable main contrib non-free | |
deb http://deb.debian.org/debian/ stable-updates main contrib non-free | |
deb-src http://deb.debian.org/debian/ stable-updates main contrib non-free |
This file contains 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
server { | |
# Port that the web server will listen on. | |
listen 80; | |
listen [::]:80; | |
# Host that will serve this project. | |
server_name localhost; | |
# Useful logs for debug. | |
access_log /var/log/nginx/localhost_access.log; |
This file contains 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
### Script para instalação e configuração de um servidor LEMP | |
### Dist. Debian 9 (Strech) | |
### Esse script é utlizado em uma instalação nova do Debian Stretch na Linode | |
### Nada impede alterar e utilizar conforme suas necessidades | |
### Atualizado em 18/11/2017 | |
### Por Aristides Neto | |
### Salvar o script em um diretório de sua preferência | |
### Dar permissão de execução |
This file contains 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
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
server_name example.com.br www.example.com.br; | |
return 301 https://$server_name$request_uri; | |
} | |
server { |
This file contains 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
ssl_certificate /etc/letsencrypt/live/example.com.br/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/example.com.br/privkey.pem; |
This file contains 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
# from https://cipherli.st/ | |
# and https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_prefer_server_ciphers on; | |
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"; | |
ssl_ecdh_curve secp384r1; | |
ssl_session_cache shared:SSL:10m; | |
ssl_session_tickets off; | |
ssl_stapling on; |
This file contains 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
<?php | |
// Dados de conexao com o banco | |
define('MYSQL_HOST', 'localhost'); | |
define('MYSQL_USER', 'user_db'); | |
define('MYSQL_PASSWORD', 'pass_db'); | |
define('MYSQL_DB_NAME', 'name_db'); | |
define('HOME', 'http://example.com'); | |
try |
This file contains 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
#------------------------------------------------------------------------------# | |
# OFFICIAL DEBIAN REPOS | |
#------------------------------------------------------------------------------# | |
###### Debian Main Repos | |
# deb http://deb.debian.org/debian/ stable main contrib non-free | |
# deb-src http://deb.debian.org/debian/ stable main contrib non-free | |
# deb http://deb.debian.org/debian/ stable-updates main contrib non-free | |
# deb-src http://deb.debian.org/debian/ stable-updates main contrib non-free |
OlderNewer