1 |
Hi, |
2 |
|
3 |
I have some problem with apache virtual hosts configuration. |
4 |
When I enter http://www.<myhost>.com in browser, I get the right |
5 |
page. But when I enter http://<myhost>.com, I'm redirected to |
6 |
default (other) page on the server. Where could be the problem? |
7 |
Should not the ServerAlias directive take care of it? |
8 |
|
9 |
Jarry |
10 |
|
11 |
|
12 |
# more /etc/apache2/vhosts.d/30_<myhost>_vhost.conf |
13 |
<VirtualHost *:80> |
14 |
ServerName www.<myhost>.com |
15 |
ServerAlias <myhost>.com |
16 |
Include /etc/apache2/vhosts.d/<myhost>_vhost.include |
17 |
<IfModule mpm_peruser_module> |
18 |
ServerEnvironment apache apache |
19 |
</IfModule> |
20 |
</VirtualHost> |
21 |
|
22 |
# more /etc/apache2/vhosts.d/<myhost>_vhost.include |
23 |
ServerAdmin root@<myhost>.com |
24 |
DocumentRoot "/var/www/<myhost>/htdocs" |
25 |
<Directory "/var/www/<myhost>/htdocs"> |
26 |
Options Indexes FollowSymLinks |
27 |
AllowOverride All |
28 |
Order allow,deny |
29 |
Allow from all |
30 |
</Directory> |
31 |
<IfModule alias_module> |
32 |
ScriptAlias /cgi-bin/ "/var/www/<myhost>/cgi-bin/" |
33 |
</IfModule> |
34 |
<Directory "/var/www/<myhost>/cgi-bin"> |
35 |
AllowOverride None |
36 |
Options None |
37 |
Order allow,deny |
38 |
Allow from all |
39 |
</Directory> |
40 |
|
41 |
(Note: my real domain name is substituted with <myhost>) |
42 |
|
43 |
-- |
44 |
_______________________________________________________________ |
45 |
This mailbox accepts e-mails only from selected mailing-lists! |
46 |
Everything else is considered to be spam and therefore deleted. |