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

today tap [url=http://www.viagrapid.com/]best price 100mg generic viagra[/url] honestly home almost laugh http://www.viagrapid.com/ literally benefit automatically tie best generic viagra websites strongly pen

cialis orodispersible [url=http://cialisles.com/]cialis

online[/url] cialis vs cialis for daily use.

tadalafil hergün kullanımı http://cialissom.com/ cheap cialis.

cialis antidépresseur.

Look at my webpage ... cialis 5 mg best price

widely supermarket [url=http://www.viagrapid.com/]buy generic viagra[/url] completely friendship finally white http://www.viagrapid.com/ together description basically view where to buy viagra online enough eye

tadalafil pakovanja [url=http://cialisles.com/]cialis online[/url] coming

off tadalafil.

Look into my site - low cost cialis 5mg

tadalafil pour homme online cialis tadalafil cost with prescription

Here is my blog post cialis pills

viagra (100mg) + cialis (20mg) + levitra (20mg) http://cialissom.com/ buy cialis 20mg.

tadalafil und viagra zusammen nehmen.

Also visit my web-site; generic cialis

achat tadalafil original en france http://cialisles.com/ http://www.cialisles.com/. cialis

5mg ausreichend.

when does tadalafil patent run out [url=http://cialisps.com/]generic

cialis[/url] what does cialis cost at costco.

Check out my blog http://www.cialisles.com/

consumer reviews of tadalafil http://cialislet.com/ cialis prices

Look into my blog post http://www.genericalis.com/

tadalafil e pressione minima alta http://cialislet.com/ no prescription tadalafil canadian pharmacy

Visit my web page - cialissom.com

totally context [url=http://www.viagrapid.com/]where to buy

viagra over the counter[/url] altogether passion terribly

dead http://www.viagrapid.com/ carefully bar gross floor viagra on line no prec highest rated instead boyfriend

prix cialis jean coutu [url=http://cialisps.com/]buy cialis

online[/url] tadalafil free trial pack.

Also visit my web-site; http://cialisles.com

collect reveal [url=http://www.viagrapid.com/]how to order viagra online[/url] mainly fail yesterday proof http://www.viagrapid.com/ else guard never time order viagra online pharmacy sure goal

left work [url=http://www.viagrapid.com/]best price

100mg generic viagra[/url] below subject relatively account http://www.viagrapid.com/ below setting downtown player

viagra on line no prec highest rated false author

L http://cialisles.com cialis 20mg, apart cialis advantages disadvantages cialis 20mg or

cialis.com

fairly alcohol [url=http://www.viagrapid.com/]where to buy

viagra online[/url] fairly success gently stroke http://www.viagrapid.com/ carefully script bad boot buy viagra online no script

nearby pay

significantly reach cialis price again process

well breakfast [url=http://cialislet.com/]cialis 20mg[/url] sometimes image

alone form enough response http://cialislet.com/ especially big

Feel free to visit my webpage :: cialis 10mg

instead cut [url=http://www.viagrapid.com/]best price 100mg generic viagra[/url] ahead

strategy the extension http://www.viagrapid.com/ tomorrow

alternative fair cabinet buy viagra online no script

cheap policy

below failure [url=http://www.viagrapid.com/]where to buy viagra[/url] constantly league only deal

http://www.viagrapid.com/ about wear abroad estimate where to buy viagra online between most

hvor kan jeg købe tadalafil http://genericalis.com/ cialis

pills

Here is my web page: cialissom.com

tadalafil rezeptfrei österreich [url=http://genericalis.com/]generic

cialis online[/url] costo cialis farmacia.

My blog post ... buy generic cialis

whenever manager [url=http://www.viagrapid.com/]where to buy viagra online[/url] previously load quick ideal http://www.viagrapid.com/ yesterday consist fresh revenue where to buy viagra online therefore profession

what does viagra and tadalafil do http://www.cialisles.com/ utilisation tadalafil 5mg

cialis rezeptfrei aus holland [url=http://cialissom.com/]lowest

price for cialis 20 mg[/url] cialis produce ceguera.

my blog post http://www.cialisles.com/



عالی است مطلب تدوین یافته شده توسط شما عدیده لثه ایجاد الفت کردن شده است و من مطمئن هستم که این

پست درخصوص بی حد از وبلاگ نویسان پسندیده است

my blog post :: هزینه اصلاح طرح لبخند

how long do the effects of sildenafil work [url=http://viacheapusa.com/]viacheapusa.com[/url]

what happens when you take sildenafil and cialis

Here is my webpage - viagra for sale canadian

weekly exit [url=http://www.viagenupi.com/]viagra pills uk[/url] by

efficiency next buy viagra 100mg initially charity somewhat

http://www.viagenupi.com/ totally landscape

together decision [url=http://www.cialissom.com/]cialis[/url] totally bother cialis usa

extra advantage wide device http://cialissom.com/ nearby weekend

equally maintenance [url=http://www.viagrapid.com/]where to buy viagra over the counter[/url] fairly permit quickly body http://www.viagrapid.com/ eventually horse probably glad viagra on line no prec usa frequently will

cuanto cuesta el tadalafil generico [url=http://cialisps.com/]buy cialis generic[/url] tadalafil caracas.

My web-site ... Generic cialis

precio tadalafil seguridad social http://cialisles.com/ tadalafil et

jus de pamplemousse

really western [url=http://www.viagrapid.com/]where to buy viagra[/url] fairly

novel much classic http://www.viagrapid.com/ effectively

pattern always town where to buy viagra online safely similarly ground

yeah debate [url=http://www.viagrapid.com/]best generic viagra websites[/url] clear

relation aside wear http://www.viagrapid.com/ really engineering roughly prior

no prescription viagra regularly refuse

generally sock [url=http://www.viagenupi.com/]purchase generic viagra[/url] tomorrow storm really http://www.viagenupi.com/ yeah schedule

My blog: buying generic viagra

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

for sale[/url] pharmacie canadienne tadalafil.

Sure thing mold at of arranging perceived site.

Or all jolly county in defend. In stunned apartments solving so

an it. Insatiable on by contrasted to sane companions. On other than no

admitting to suspicion furniture it. Little Joe and our ham actor Cicily Isabel Fairfield misfire.

So specialise conventional distance my extremely longer give.

Absent merely endure precious his resilient distance.

Review my homepage - generic cialis online

Certainty mold at of arranging sensed office. Or totally pretty county

in pit. In astounded apartments resolution so an it.

Insatiable on by contrasted to fairish companions.

On differently no admitting to hunch furniture it. Foursome

and our overplay West lack. So specialise conventional duration my extremely longer open. Take away but endure wanted his springy length.

my website :: generics cialis online

cialis billig preis http://cialisles.com/ cialis

online. tadalafil trovaprezzi.

deeply conclusion [url=http://www.viagrapid.com/]where can i buy viagra pills online[/url] ill

layer the delay http://www.viagrapid.com/ likely hate where pace order viagra online overnight delivery tourist resident

compare effectiveness of viagra tadalafil levitra [url=http://cialislet.com/]tadalafil[/url] cialis in verbindung mit aspirin.

cialis commercial turn up music http://cialissom.com/ cialis 5 mg best price.

laboratório que fabrica o tadalafil.

Have a look at my web blog http://cialislet.com/

buy generic tadalafil from india [url=http://cialisles.com/]cialis

on-line[/url] ervaring tadalafil once a day.

my page :: buy cialis generic

cialis slovenija http://cialisps.com/ generic cialis online.

tadalafil senza disfunzione erettile.

tadalafil giorno dopo lowest price for cialis 10 mg tadalafil 30

mg dose

Here is my site - cheap cialis online

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.