Instalar y Configurar Apache
index | about | archive | charlas | docs | links
dot
|
git
|
img
|
plt
|
tty
|
uml
Instalar Apache
apt-get install apache2-mpm-prefork libapache2-mod-php5
Crear un VirtualHost
Primero se debe crear un archivo preferentemente con el nombre
del dominio y ubicarlo en sites-available
.
vi /etc/apache2/sites-available/sitioweb.com
El contenido debe tener al menos los siguientes parámetros:
<VirtualHost *:80> ServerName sitioweb.com ServerAlias www.sitioweb.com DocumentRoot /var/www/sitioweb <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ErrorLog /var/log/apache2/error.log LogLevel warn CustomLog /var/log/apache2/access.log combined </VirtualHost>
Luego se debe habilitar el sitio, de la siguiente manera:
a2ensite sitioweb.com
Iniciar, Detener y Reiniciar Apache
Los cambios en los VirtualHost son aplicados sólo cuando se reinicia el servicio, es posible hacerlo de dos maneras:
/etc/init.d/apache2 start|stop|restart apache2ctl stop|start|graceful