Taula de continguts

instalación rápida debian 6 como seedbox

instalación básica

0.sh
apt-get update && apt-get upgrade
apt-get install vim
useradd -m -d /home/user user
useradd -m -d /home/www www-data
 
//su www-data & cd /home/www
mkdir -p /home/www/public
mkdir -p /home/www/private
mkdir -p /home/www/log
mkdir -p /home/www/auth
chown -R www-data:www-data /home/www
 
// ^D & su user & cd
mkdir -p /home/user/completo
mkdir -p /home/user/downloading
mkdir -p /home/user/torrent
chown -R user:user /home/user
 
ln -s /home/user/completo /home/www/public/completo
ln -s /home/user/downloading /home/www/public/descargando
ln -s /home/user/torrent /home/www/public/torrent
apt-get install sudo
vim /etc/sudoers

instalación paquetes básicos

configuración apache & php

base

últimos ficheros usados

010-p2p.conf
<VirtualHost *:80>
	RewriteEngine on
	RewriteCond %{SERVER_PORT} =80
	RewriteRule ^(.*) https://%{SERVER_NAME}%{REQUEST_URI}
</VirtualHost>
 
<VirtualHost *:443>
	ServerAdmin webmaster@localhost
 
	SSLEngine on
	SSLCertificateFile /home/www/auth/Servidor_certificado.crt
	SSLCertificateKeyFile /home/www/auth/Servidor_privada.key
	SSLCACertificateFile /home/www/auth/CertificadosRaiz.crt
 
	DocumentRoot /home/www/public
	<Directory />
		Options FollowSymLinks
		AllowOverride All
	</Directory>
	<Directory /home/www/public>
		Options -Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all
	</Directory>
 
	ErrorLog /home/www/log/error.log
 
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
	LogLevel warn
 
	CustomLog /home/www/log/access.log combined
 
	<Location /rutorrent>
		AuthType Digest
		AuthName "rutorrent"
		AuthDigestDomain /home/www/public/rutorrent/ http://seedbox.torresegea.es/rutorrent
 
		AuthDigestProvider file
		AuthUserFile /home/www/auth/htpasswd
		Require valid-user
		SetEnv R_ENV "/home/www/public/rutorrent"
	</Location>
 
	<Location /completo>
		AuthType Digest
		AuthName "completos"
		AuthDigestDomain /home/www/public/completo/ http://seedbox.torresegea.es/completo
 
		AuthDigestProvider file
		AuthUserFile /home/www/auth/htpasswd2
		Require valid-user
		SetEnv R_ENV "/home/www/public/completo"
 
		Options Indexes
		Order allow,deny
		allow from all
	</Location>
 
</VirtualHost>

es necesario generar los ficheros de certificados y los de contraseñas (o copiarlos de dónde estén)

ficheros apache viejos

configuración apache ports.conf

/etc/apache2/ports.conf
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz
 
NameVirtualHost *:80
Listen 80
 
<IfModule mod_ssl.c>
# If you add NameVirtualHost *:443 here, you will also have to change
# the VirtualHost statement in /etc/apache2/sites-available/default-ssl
# to <VirtualHost *:443>
# Server Name Indication for SSL named virtual hosts is currently not
# supported by MSIE on Windows XP.
NameVirtualHost *:443
Listen 443
</IfModule>
 
<IfModule mod_gnutls.c>
Listen 443
</IfModule>

otras instalaciones