Forum Moderators: phranque

Message Too Old, No Replies

Creating a virtual host

It doesn't redirect to the index.php of the virtual host.

         

tirengarfio

1:25 pm on Jul 17, 2010 (gmt 0)

10+ Year Member



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>

- 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

3:35 pm on Jul 17, 2010 (gmt 0)

10+ Year Member



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>

mack

3:47 pm on Jul 17, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



<VirtualHost *:80>
ServerName micramor.com
DocumentRoot /var/www/rs2/web
</VirtualHost>

When you simplify it like the example above does it display your index file?

Mack.

jdMorgan

4:15 am on Jul 18, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is DirectoryIndex defined?

Jim

lammert

5:58 am on Jul 18, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If your site is CMS based--which looks like it because of the path references to Symphony--it might be that the CMS software is absorbing all requests and defines its own homepage location. Drupal does that kind of thing also if I remember correctly. With Symphony you might have to look in the routing.yml file to see if a homepage has been defined.