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
server { | |
# Your directives here... | |
# Configure .htpasswd file & Network IP. | |
auth_basic_user_file /etc/nginx/conf.d/.htpasswd; // ruta donde se encuentra el .htpasswd | |
set_real_ip_from XXX.XXX.XXX.XXX/XX; // Rango de red donde se encuentra el Load Balancer | |
real_ip_header X-Forwarded-For; | |
# Add location with Basic Auth | |
location /location/to/protect { |
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
add_header X-Frame-Options SAMEORIGIN; | |
add_header X-XSS-Protection "1; mode=block"; | |
add_header Content-Security-Policy "default-src 'self';"; #OJO CON ESTE | |
add_header X-Content-Type-Options nosniff; |
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
Header always append X-Frame-Options SAMEORIGIN | |
Header set X-XSS-Protection "1; mode=block" | |
Header set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" | |
Header set Content-Security-Policy "default-src 'self';" #OJO CON ESTE | |
Header set X-Content-Type-Options nosniff |
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 install curl | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3 | |
curl -sSL https://get.rvm.io | bash -s stable | |
source /etc/profile.d/rvm.sh | |
rvm requirements | |
rvm list known | |
rvm install 2.2.4 | |
rvm use 2.2.4 --default |
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
#Crear Base | |
create database new_database_name; | |
#Crear usuarios | |
create user 'new_database_user'@'%' identified by 'user_password_here'; | |
# Conceder permisos | |
grant all privileges on new_database_name.* to 'new_database_user'@'%'; | |
# Cambiar password de un usuario |