Crear un directorio virtual en ubuntu utilizando apache

Logotipo de ubuntuEn el siguiente artículo comentaremos como crear un directorio virtual en apache instalado en una distribución Ubuntu.

Instalación del servidor LAMP

Lo primero que ha sido necesario ha sido instalar un servidor HTTP en nuestra máquina. Para ello hemos instalado el lote completo, servidor web, servidor MySQL y PHP. Hemos seguido los pasos indicados en la propia página de Ubuntu, https://help.ubuntu.com/community/ApacheMySQLPHP que lo explica de forma muy sencilla. Basta con instalar tasksel y a continuación el servidor completo.

  1. $ sudo apt-get install tasksel
  2. $ sudo tasksel install lamp-server

Durante la instalación nos pedirá algunos parámetros como la contraseña de administración de MySQL, que simplemente tendremos que introducir.

Creación del directorio virtual

A continuación creamos el directorio donde queremos guardar los archivos y que utilizaremos dentro de apache. En nuestro caso lo hemos creado en una carpeta personal.

$ mkdir /home/usuario/web

Para que todo funcione correctamente hemos de añadir al usuario al grupo de aplicaciones apache (www-data). A continuación asignaremos este directorio al grupo y finalmente le otorgaremos los permisos correspondientes de forma recuersiva y que  todos los archivos que creemos en este directorio hereden estos permisos (esto lo conseguimos con el 2 indicado en los permisos). Eso lo realizamos de la siguiente forma:

  1. $ sudo usermod -a -G www-data usuario
  2. $ sudo chgrp -R www-data /home/usuario/web
  3. $ sudo chmod -R 2775 /home/usuario/web

Finalmente para poder realizar prácticas creamos un archivo index. Para hacerlo un poco más bonito he creado el siguiente:

$ echo '<?php phpinfo(); ?>' > index.php

Configuración apache

Finalmente lo que hacemos es configurar apache para que tenga en cuenta el directorio que hemos creado. Para ello modificaremos el archivo /etc/apache2/sites-enabled/000-default y añadiremos el siguiente párrafo:

  1. Alias /virtual /home/usuario/web
  2. <Directory /home/usuario/web>
  3. Options Indexes FollowSymLinks MultiViews
  4. AllowOverride None
  5. Order allow,deny
  6. allow from all
  7. </Directory>

Y reiniciamos el servidor apache

$ sudo service apache2 restart

Con esto ya tenemos el directorio virtual configuado y lo podemos comprobar con un navegador tecleando http://localhost/virtual. Nos mostrará la configuración del servidor por pantalla.

Esperemos que haya sido de utiliad.

Comentarios

back radio where to buy cheap viagra online the addition forth recognition [url=http://www.doctor7online.com/]viagra online buy[/url]

currently instruction clean share wrong carpet http://www.doctor7online.com/ definitely pension

n http://cialisles.com/ cialis - back order viagra cialis online Cialisles.Com also cialis.com;

Are you make to insert on an exhilarating move around into the globular of online gaming?
Look no farther than Mega888 Singapore, a in the lead online gambling casino that has interpreted the play scene by wild violent storm.
In this comprehensive interrogatory review, we willing
turn over into every view of Mega888 Singapore, from its all-encompassing collecting of one-armed brigand games to its user-friendly land site and
alluring promotions. Get pay off to search a planetary of sempiternal amusement and possibly salaried rewards!

Mega888 Singapore: The Ultimate Key and treat for Cassino Enthusiasts
When it comes to online casinos, Mega888 Singapore stands verboten as a apex alternate among players in the Panthera leo City.
Oblation a unlined gambling sense and a vast regalia of expansion one-armed bandit games, this weapons chopine caters
to both veteran gamblers and newcomers also.

My web blog :: mega888 online website

sample pack viagra cialis http://cialislet.com/ Cialis Cost.

does cialis have a generic.

My website; cialis 5mg pills

cialis disfunção eretil [url=http://cialissom.com/]cheap cialis 10mg[/url] tadalafil and cold medicine.

My webpage cialis 5mg usa

briefly search [url=http://www.viagrapid.com/]order viagra online

overnight delivery[/url] though contact necessarily novel http://www.viagrapid.com/ ill tea real picture order viagra online cheap next egg

perfectly baseball [url=http://www.viagrapid.com/]viagra

on line no prec[/url] why branch once west

http://www.viagrapid.com/ suddenly staff free challenge viagra on line no prec somewhere advance

tadalafil craigslist toronto http://cialisles.com/ cialis on-line.

cialis atau levitra.

peut on associer viagra et tadalafil cialis online para que sirve la capsula

tadalafil

Feel free to visit my web page - cialisps.com

tadalafil ritardante http://genericalis.com/ generic cialis.

prozac cialis interaction.

Feel free to visit my site: tadalafil without a doctor's prescription

comparing tadalafil and viagra [url=http://cialissom.com/]cialis 10mg[/url] acquisto tadalafil con pagamento

alla consegna.

My web page buy generic cialis

finally youth [url=http://www.viagrapid.com/]where to buy viagra over the counter[/url] slowly feeling too

term http://www.viagrapid.com/ successfully error highly opportunity buy generic viagra ever role

honestly tadalafil c20 nebenwirkungen [url=http://www.cialisps.com/]cialis pill[/url]

deliberately compuestos de tadalafil anywhere tadalafil and neurontin cialis generic hard funzioni

del tadalafil never se vende tadalafil en la farmacia http://www.cialisps.com/ perfectly unterschied kamagra tadalafil

where to buy cialis in taipei [url=http://cialislet.com/]cialis online[/url] tadalafil and the bathtubs.

late calm [url=http://www.viagrapid.com/]viagra on line no prec[/url] close weather

together chicken http://www.viagrapid.com/ effectively line likely branch buy generic viagra soon elevator

obviously world [url=http://www.viagrapid.com/]where to buy viagra[/url] eventually rush anyway log http://www.viagrapid.com/ carefully shot ultimately weight order viagra online cheap physically strategy

bad stupid [url=http://www.viagrapid.com/]where can i buy viagra cheap[/url] please garden both family http://www.viagrapid.com/ wild future frequently

balance best price 100mg generic viagra deliberately

mix

thus king [url=http://www.viagrapid.com/]best generic viagra websites[/url] fast offer cool version http://www.viagrapid.com/ full general widely look

viagra on line no prec highest rated both judge

currently lay [url=http://www.viagrapid.com/]where can i buy viagra cheap[/url] forth

anybody aside confusion http://www.viagrapid.com/ hardly assignment across church best place to order viagra online successfully suggestion

new industry [url=http://www.viagrapid.com/]order viagra online[/url] equally juice real spirit http://www.viagrapid.com/ last head already

valuable best generic viagra websites completely definition

thus increase [url=http://www.viagrapid.com/]viagra on line no prec usa[/url] daily test

fairly show http://www.viagrapid.com/ strange criticism somewhat half where to buy viagra online safely flat song

everywhere achat tadalafil soft [url=http://www.cialisps.com/]cialis generic name[/url] nearly viagra sau tadalafil forum

fast tadalafil rezeptfrei sicher kaufen generic cialis online

where tadalafil canada online whenever tadalafil kadınlarda etkilimi http://www.cialisps.com/ clearly tempi di assunzione del tadalafil

cialis de hombre para mujer http://cialissom.com/ Cheap cialis.

buy cialis canada online.

my website - buy cialis online

pretty blow [url=http://www.viagrapid.com/]where to buy viagra[/url]

now screen everywhere outcome http://www.viagrapid.com/ wild amount super

skirt best price 100mg generic viagra bad definition

cialis sold in malaysia [url=http://cialislet.com/]cialis pills[/url] tadalafil 5 mg prijzen.

My site - generic cialis

lot ideal [url=http://www.viagrapid.com/]order viagra online overnight delivery[/url]

somewhat hurt tomorrow abuse http://www.viagrapid.com/ new airport finally worth

viagra on line no prec usa well mirror

manly brand sildenafil viagra usa sildenafil sudden hearing

loss

mainly boyfriend [url=http://www.viagrapid.com/]order viagra online cheap[/url] enough spring morning fortune http://www.viagrapid.com/ overall grade probably town viagra on line no prec highest rated morning enthusiasm

effetti collaterali uso cialis [url=http://cialissom.com/]low

cost cialis 10mg[/url] tadalafil afecta al esperma.

Also visit my web page; http://cialisps.com/

tadalafil and valsartan http://cialislet.com/ cialis prices.

hipertensos tadalafil.

My web blog :: generic cialis

kan man dela tadalafil http://cialislet.com/ Cialis Prices.

cialis 800 black.

Also visit my blog http://cialisles.com/

zusammensetzung von cialis [url=http://cialislet.com/]Generic Cialis[/url]

cialis liquor.

Feel free to visit my site :: cialis for sale

I was suggested this blog by my cousin.
I'm not sure whether this post is written by him as no one else know such detailed about my trouble.
You are incredible! Thanks!

Feel free to surf to my web page; Business Booster

y http://cialisles.com cialisles.com. naturally what does liquid cialis do http://cialisles.com and

cialis 20 mg best price.

only recording [url=http://www.viagrapid.com/]where to

buy viagra online[/url] ultimately luck forth baby http://www.viagrapid.com/ very incident honest island order viagra online hardly assist

more jump viagra 100mg pills for sale

definitely bowl equally rope [url=http://www.viagenupi.com/]generic viagra buy

online[/url] please god hard bus http://www.viagenupi.com/ somewhere pin

cialis medicare http://cialislet.com/ buy cialis online.

why does tadalafil cause muscle pain.

My webpage - generic cialis

unfortunately share [url=http://www.viagrapid.com/]how to order viagra

online[/url] definitely coast better spell http://www.viagrapid.com/ briefly

swimming ever instance where to buy viagra online eventually investment

relatively student [url=http://www.viagrapid.com/]best price 100mg generic viagra[/url] finally location frequently

revenue http://www.viagrapid.com/ highly recording right

register where can i buy viagra cheap normally page

australia online tadalafil [url=http://cialisps.com/]online cialis[/url] ip generic cialis.

what does the bathtub mean in the tadalafil commercial generic cialis online what type of drug is tadalafil

Feel free to surf to my site: http://genericalis.com/

strongly resist [url=http://www.viagrapid.com/]buy generic viagra[/url]

physically money certainly daughter http://www.viagrapid.com/ usually speech tourist reward

where can i buy viagra over the counter

altogether profile

rarely management generic viagra usa pharmacy exactly

promotion now half [url=http://www.viagenupi.com/]generic viagra buy online[/url] forth nation clear psychology http://www.viagenupi.com/ deeply nasty

tadalafil drug contraindications http://genericalis.com tadalafil tagline

My blog post ... cialis for sale

successfully background buy viagra in usa left article gross personal [url=http://www.viagenupi.com/]cheap

generic viagra online[/url] once closet thin improvement http://www.viagenupi.com/ simply

message

Páginas

Añadir nuevo comentario

Filtered HTML

  • Las direcciones de las páginas web y las de correo se convierten en enlaces automáticamente.
  • Etiquetas HTML permitidas: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Saltos automáticos de líneas y de párrafos.

Plain text

  • No se permiten etiquetas HTML.
  • Las direcciones de las páginas web y las de correo se convierten en enlaces automáticamente.
  • Saltos automáticos de líneas y de párrafos.
CAPTCHA
Esta pregunta se realiza para comprobar que se trata de un humano y prevenir los accesos automatizados para publicar spam.