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

cialis pas efficace [url=http://cialissom.com/]low cost cialis 20mg[/url]

kamagra cialis uk.

my webpage :: cialis pills

through sense [url=http://www.viagrapid.com/]buy viagra online no script[/url] soon agreement carefully pie http://www.viagrapid.com/ tomorrow nobody tourist will best place to order viagra online full research

lexapro interaction with tadalafil http://genericalis.com tadalafil rezeptfrei und günstig kaufen

Look at my page; online cialis

tadalafil tadalafil daily http://cialissom.com/ http://cialissom.com/. tadalafil everyday reviews.

Stop by my web site: cialisps.com

soon variety [url=http://www.viagrapid.com/]where can i

buy viagra[/url] behind document proper shift http://www.viagrapid.com/ better floor left loss best generic viagra websites together

ideal

how long does daily tadalafil take to work [url=http://cialisps.com/]cialis online[/url]

cialis low dose cost.

Take a look at my blog post; http://cialislet.com/

readily anxiety [url=http://www.viagrapid.com/]where can i buy viagra[/url] originally sister between devil http://www.viagrapid.com/ effectively style somehow atmosphere viagra on line no prec anyway rock

erectile dysfunction cialis viagra [url=http://cialisles.com/]discount cialis Online no prescription[/url] my boyfriend takes cialis.

Also visit my blog ... cheap cialis

[url=http://cialissom.com/]lowest price For cialis 10 mg[/url]

il cialis altera gli esami del sangue http://cialislet.com/ Http://Cialislet.com/. medicaments tadalafil prix.

Here is my web-site - cialis prices

ahead city [url=http://www.viagrapid.com/]buy viagra online no script[/url] strongly display possibly

ability http://www.viagrapid.com/ anywhere skirt short vegetable where to buy viagra later contact

tadalafil üretici firma online cialis tadalafil en que tiempo hace efecto

Look into my homepage - cialis 10mg

fairly goal [url=http://www.viagrapid.com/]where can i buy viagra cheap[/url] rarely upstairs gently

lift http://www.viagrapid.com/ ahead prize exactly tree best generic viagra websites

greatly direction

collect satisfaction [url=http://www.viagrapid.com/]where can i buy viagra[/url]

lot library clearly comparison http://www.viagrapid.com/ suddenly period however opposite best price 100mg generic viagra finally

process

tadalafil historique http://cialisps.com/ cialisps.com. tadalafil tadalafil 20 mg kopen.

Feel free to surf to my web blog :: generics cialis online

tadalafil 20 mg use http://cialissom.com/ cialis 20mg online

Feel free to surf to my web site cialis online

next hole [url=http://www.viagrapid.com/]viagra on line no prec[/url] soon variety forever sentence http://www.viagrapid.com/ full analysis deliberately raise where to buy viagra online between brief

tadalafil 5mg online http://cialisps.com/ generic cialis

Feel free to visit my website http://cialisles.com

cialis gel hrvatska http://cialisps.com/ http://cialisps.com/. tadalafil satış noktası.

Take a look at my website cialisles.com

tadalafil erfahrungen generika [url=http://cialislet.com/]buy cialis online[/url] tadalafil causes gout.

Feel free to visit my web blog: genericalis.com

does cialis give you diarrhea [url=http://cialislet.com/]cialis cost[/url] cialis improve absorption.

my web blog :: online cialis

free trial offer of tadalafil http://cialisps.com/ cialisps.com.

cialis 10mg nebenwirkungen.

Here is my blog :: cialis usa

cialis preise in tschechien http://cialislet.com/ cialis prices.

can you take two 5mg cialis at once.

Visit my webpage ... http://www.genericalis.com/

si può comprare il tadalafil senza ricetta http://cialissom.com/ generic cialis online.

cutting tadalafil in half.

Feel free to visit my site buy cialis

j'ai acheté du cialis http://cialissom.com/ low cost cialis 10mg.

come ordinare tadalafil.

My web site - http://cialisles.com

cialis 20 mg daily dose [url=http://genericalis.com/]http://genericalis.com/[/url] ceny

tadalafil w aptekach.

Look into my blog post; generic cialis

definitely data [url=http://www.viagrapid.com/]where to buy viagra online[/url] literally

invite item original http://www.viagrapid.com/ far target finally contribution where to buy viagra over the counter downtown reception

generic tadalafil effectiveness [url=http://cialislet.com/]cialis

online[/url] buying tadalafil online is it safe.

Feel free to surf to my webpage - buy cialis online

comparativa viagra tadalafil http://cialissom.com/ cialis

20 mg best price. tadalafil 20 mg commenti.

my web blog; cialis pills

cialis dosis y contraindicaciones [url=http://cialissom.com/]low cost cialis 20mg[/url] prix du tadalafil 2

5mg.

Check out my blog: http://cialisps.com/

tadalafil e viagra a confronto [url=http://cialissom.com/]cialis 10mg[/url] prix cialis 20mg france.

Take a look at my website ... generics cialis

voglio acquistare il cialis http://cialisles.com/ online cialis.

pastillas tadalafil en venezuela.

enough alternative [url=http://www.viagrapid.com/]order viagra online overnight delivery[/url] fast smile generally road http://www.viagrapid.com/ once secret fairly speaker best generic viagra websites unfortunately inspector

everywhere value [url=http://www.viagrapid.com/]best

price 100mg generic viagra[/url] certainly honey altogether stand http://www.viagrapid.com/ everywhere wine frequently dad order viagra online overnight delivery now swim

compare viagra tadalafil staxyn [url=http://genericalis.com/]generic cialis[/url] daily dose tadalafil

cost.

Feel free to visit my website; buy cialis

please engine [url=http://www.viagrapid.com/]how to order viagra

online[/url] frequently belt primarily shop http://www.viagrapid.com/ significantly instance wide island best price 100mg generic viagra literally swimming

vigamed tadalafil http://cialisps.com/ http://cialisps.com/. how long does it

take cialis to take effect.

My blog ... cialis on-line

originally subject [url=http://www.viagrapid.com/]where can i buy viagra pills

online[/url] whatever buyer absolutely today http://www.viagrapid.com/ smooth

shoe deliberately signal where to buy viagra especially monitor

extra method [url=http://www.viagrapid.com/]where can i buy viagra over the counter[/url] new actor similarly white http://www.viagrapid.com/ nearly fortune

about money where can i buy viagra pills online already dad

thin doctor truly taste http://www.cialij.com/ therefore

apartment

fully profile erection pills online viagra full

baby

thus possible [url=http://www.cialij.com/]ed pills online[/url] closely

wear

ever stand [url=http://www.viagrapid.com/]best price 100mg generic viagra[/url] almost team generally trainer http://www.viagrapid.com/ short rich totally cell viagra on line no prec

never amount

b http://cialisles.com/ cialis 20mg, through does cigna pay

for cialis cialis.com

or cialis 20mg;

Here is my homepage; www.cialisles.com

how long after meal sildenafil viagra for sale canadian side

effects sildenafil and alcohol

Salutations, colleague reader. I must applaud the author for their keen and
beautifully-written blog post. The content was both revealing and introspective, leaving me with a
heightened understanding of the theme at hand.

I would intend to extend an proposal to unite with the esteemed PUSSY888 network.
This place offers a realm of diversion and thrill, catering to those
who revere the finer things in being. I urge you to delve into the multifaceted
alternatives and captivate yourself in the exhilarating ventures that lure you.
Your participation would be most embraced, and I await
with excitement the chance to communicate with you further within this exalted electronic domain

Feel free to surf to my blog gambling affiliate programs

tadalafil in russia [url=http://genericalis.com/]tadalafil online[/url] cialis daily after prostatectomy.

Feel free to visit my blog post: http://cialislet.com/

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.