Forum Moderators: phranque

Message Too Old, No Replies

Virtual Host configuration

         

unarcher

2:51 pm on Jul 20, 2012 (gmt 0)

10+ Year Member



Hi, actually trying to configure Apache for 2 websites
First one should answer to request for any URL and serve main website
Second one should only anwser to URL m.example.com and serve another web site
I dont succeed to make it work, I am always directed to main website



<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName m.example.com
Serveralias m.example.com
# Indexes + Directory Root.
DocumentRoot /local/home/lebureau/mobile
<Directory /local/home/lebureau/mobile>
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>

# Logfiles
ErrorLog /var/log/apache2/error.log
</VirtualHost>


<VirtualHost _default_:80>
ServerAdmin webmaster@localhost
ServerName default
ServerAlias *
DocumentRoot /local/www/feuillatte
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /local/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>


#FastCgiExternalServer /local/www/cgi-bin/php5.external -socket /local/www/.socks/feuillatte.sock
#Alias /cgi-bin/ /local/www/feuillatte/cgi-bin

<Directory /local/www/feuillatte>
Options SymLinksIfOwnerMatch
AllowOverride All
Order allow,deny
allow from all
</Directory>


# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined

<Directory /local/www/feuillatte/phpmyadmin>
#modif Nico
Options SymLinksIfOwnerMatch
#modif Nico
Order allow,deny
Allow from all
</Directory>

</VirtualHost>

[edited by: incrediBILL at 7:51 pm (utc) on Jul 20, 2012]
[edit reason] fixed URLS, use Example.com [/edit]