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
Example of vhost configuration in Plesk based server, in this case to disable SSLv2. | |
1) edit/create /var/www/vhosts/domain.com/conf/vhost.conf | |
2) only add the needed commands that you want overwrite: | |
### start ### | |
# General setup for the virtual host, inherited from global configuration | |
DocumentRoot "/var/www/vhosts/domain.com/httpdocs.production" | |
ServerName domain.com:443 |
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
step 1: | |
rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm | |
step 2: | |
yum install git |
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
# Encontrar directorios (-type d) en el directorio actual (.) y darles | |
# acceso 755 | |
find . -type d -exec chmod 755 {} \; | |
# Encontrar archivos (-type f) en el directorio actual (.) y darles | |
# acceso 644 | |
find . -type f -exec chmod 644 {} \; | |
# Encontrar archivos (-type f) html (-name '*.htm*') en el subdirectorio | |
# web (./web) y darles acceso 644 |
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
# Install npm (new URL is www.npmjs.org instead npmjs.org) | |
curl https://www.npmjs.org/install.sh | sh | |
# To uninstall npm: | |
npm rm npm -g | |
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
# Crea/edita .htaccess en el directorio raíz de la app | |
vi .htaccess | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} | |
</IfModule> |
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
# GENERAR CERTIFICADO AUTOFIRMADO | |
# Importante. Asume root temporalmente para estos procedimientos | |
su - | |
# Crear todo los archivos en este directorio y no borrarlos nunca! para evitar problemas con SELinux | |
mkdir ~/securing-server | |
cd ~/securing-server | |
# Obtener software requerido |
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
sudo adduser username | |
sudo passwd username | |
sudo visudo | |
## Allow root to run any commands anywhere | |
root ALL=(ALL) ALL | |
username ALL=(ALL) ALL |
NewerOlder