Plusieurs domaines B. apache

Il y avait des difficultés avec la mise en place de plusieurs domaines

quand je sudo a2ensite example2, Il n'est pas chargé, que cela soit activé ou désactivé. excpe1 ... Et, bien sûr, example1 Supprime avec vous. Voici deux fichiers (example2 basé sur example1)

Sur des sites il y a un fichier example1

<virtualhost *:80="">
ServerAdmin webmaster@localhost
ServerName example1.com
ServerAlias example1.com

DocumentRoot /var/www/example1
<directory></directory>
Options FollowSymLinks
AllowOverride None

<directory example1="" var="" www=""></directory>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all


ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<directory "="" cgi-bin"="" lib="" usr="">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</directory>

ErrorLog /home/ubuntu/www/logs/example1/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /home/ubuntu/www/logs/example1/access.log combined

Alias /doc/ "/usr/share/doc/"
<directory "="" doc="" share="" usr="">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</directory>
</virtualhost>

et fichier. example2

<virtualhost *:80="">
ServerAdmin webmaster@localhost
ServerName example2.com
ServerAlias example2.com

DocumentRoot /var/www/example2
<directory></directory>
Options FollowSymLinks
AllowOverride None

<directory example2="" var="" www=""></directory>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all


ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<directory "="" cgi-bin"="" lib="" usr="">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</directory>

ErrorLog /home/ubuntu/www/logs/example2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /home/ubuntu/www/logs/example2/access.log combined

Alias /doc/ "/usr/share/doc/"
<directory "="" doc="" share="" usr="">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</directory>
</virtualhost>

j'ai eu

NameVirtualHost *:80

dans ports.conf

Qu'est-ce qui me manque?
Invité:

Emilie

Confirmation de:

Vous avez vraiment compliqué vos configs. D'abord. Regarder b
http://httpd.apache.org/docs/2 ... .html
Ensuite, raccourcissez ces fichiers au minimum. Assurez-vous d'activer les sites et assurez-vous que les catalogues existent. Cela devrait faire votre travail. En outre, n'oubliez pas de redémarrer après tout apache.

Pour répondre aux questions, connectez-vous ou registre