Hello,
I was trying to configure the apache2, reading apache website, many tutorials and I think that I have all done, but one of the 2 domains configured doesn't run.
I have domain1.com and domain2.com
domain1.com runs perfectly, but when I try the domain2.com it goes to domain1.com
Could you help me?
Here is the code inside the sites-available folder:
Code:
NameVirtualHost 12.345.67.89:80
<VirtualHost www.domain1.com:80>
ServerAdmin info@domain1.com
ServerName www.domain1.com
ServerAlias domain1.com
DocumentRoot /var/www_domain1/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www_domain1/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error-domain1.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access-domain1.log combined
ServerSignature On
</VirtualHost>
<VirtualHost www.domain2.com:80>
ServerAdmin info@domain2.com
ServerName www.domain2.com
ServerAlias domain2.com
DocumentRoot /var/www_domain2/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www_domain2/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error-domain2.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access-domain2.log combined
ServerSignature On
</VirtualHost>
Awaiting your news.
Thx
Recent comments
1 day 17 hours ago
2 days 2 hours ago
2 days 5 hours ago
2 days 6 hours ago
2 days 8 hours ago
2 days 9 hours ago
2 days 11 hours ago
2 days 12 hours ago
3 days 4 hours ago
3 days 5 hours ago