Creating a virtual host

Discussion in 'Apache' started by tirengarfio, Jul 17, 2010.

  1. #1
    HI,

    these are my steps:

    - I have installed apache2 (apt-get install apache2).

    - I have created /etc/apache2/sites-available/tirengarfio.com with this content:

    <VirtualHost *> 
       ServerName tirengarfio.com 
       DocumentRoot /var/www/rs2/web 
      
       Alias /sf /var/www/rs2/lib/vendor/symfony/data/web/sf 
       <Directory "/var/www/rs2/lib/vendor/symfony/data/web/sf"> 
        AllowOverride All 
        Allow from All 
       </Directory> 
      <Directory "/var/www/rs2/web"> 
        AllowOverride All 
        Allow from All 
       </Directory> 
    </VirtualHost>
    
    Code (markup):
    - I have enabled the site and check that the symbolic link is in /etc/apache2/sites-enabled

    - I restart and reload apache.

    - I have an index.php file in /var/www/rs2/web

    When i go to tirengarfio.com it shows "It works" instead of the content of /var/www/rs2/web/index.php

    Any idea?

    Regards

    Javi
     
    tirengarfio, Jul 17, 2010 IP
  2. tirengarfio

    tirengarfio Greenhorn

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #2
    NameVirtualHost *:80
     
    
    <VirtualHost *:80> 
       ServerName micramor.com 
       DocumentRoot /var/www/rs2/web 
      
       Alias /sf /var/www/rs2/lib/vendor/symfony/data/web/sf 
       <Directory "/var/www/rs2/lib/vendor/symfony/data/web/sf"> 
        AllowOverride All 
        Allow from All 
       </Directory> 
      <Directory "/var/www/rs2/web"> 
        AllowOverride All 
        Allow from All 
       </Directory> 
    </VirtualHost> 
    Code (markup):
     
    tirengarfio, Jul 17, 2010 IP