Apache funcionant per a dues plataformes

Re: Apache funcionant per a dues plataformes

per Magí Farrés -
Nombre de respostes: 0
mira si tens aquest arxiu a /opt/lampp/etc/extra/httpd-vhosts.conf
Si vols configurar més d'un domini corrent amb el mateix apache estudiat el següent codi i adapta-l als teus dominis.

He copiat tot el que tinc dins del arxiu httpd-vhosts.conf


#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>;
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
ServerAdmin xxx@gmail.com
DocumentRoot /opt/lampp/htdocs/escolataller
ServerName etbergueda.no-ip.org
ServerAlias www.etbergueda.no-ip.org
ErrorLog logs/etbergueda.error
CustomLog logs/etbergueda.logs common
</VirtualHost>

<VirtualHost *:80>
ServerAdmin xxx@gmail.com
DocumentRoot /opt/lampp/htdocs/phpBB2
ServerName gdloforo.sytes.net
ErrorLog logs/gdloforo.error
CustomLog logs/gdloforo.logs common
</VirtualHost>

<VirtualHost *:80>
ServerAdmin xxx@gmail.com
DocumentRoot /opt/lampp/htdocs/foros/
ServerName foros.sytes.net
ErrorLog logs/foros.error
CustomLog logs/foros.logs common
</VirtualHost>