Folks:
I've come to the point where I need to ask someone who knows as I am going crazy with this for the past few days.
I am using Apache 2.2.14 installed under XAMPP for Linux on Ubuntu Server. While my apache config shows no hard errors in the error_log the symptoms I am getting as as follows:
1) when I try certain domain names they are intercepted by the main server defintion(default).
2) when I try to access a particular program on a name virtual server the error log shows that the specified program cannot be found (because its looking in the main directory).
I've coded a few sections of my main and virtual server definitions below and while their contents seem to match the reference materials I'm using, I cannot seem to get around the issues explained above.
Hopefully some of you intimately familiar with the configuration of Apache in this environment can enlighten me as to what or how I might be doing something incorrectly and suggest the correct way to do this?
I will be greatly indebted to you all.
Thanks - B
# Define Local/Default Web Service Directives
Listen 80
NameVirtualHost *:80
ServerRoot /opt/lampp
ServerAdmin admin@xyz.com
ServerName 0.xyz.com
DocumentRoot /opt/lampp/htdocs
ErrorLog logs/error_log
LogLevel warn
EnableMMAP off
EnableSendfile off
HostNameLookups off
Alias /inc/ /opt/lampp/htdocs/inc/
# First virtual host
<VirtualHost *>
<IfDefine SSL>
SSLEngine off
</IfDefine>
DocumentRoot /opt/lampp/htdocs/dir1
ServerName ServerAlias ServerAdmin admin@abc.net
ErrorLog /opt/lampp/logs/dir1/error.log
CustomLog /opt/lampp/logs/dir1/access.log common
<Directory /opt/lampp/htdocs/dir1>
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Alias /inc/ /opt/lampp/htdocs/inc/
</VirtualHost>
# Second Virtual Host
<VirtualHost *>
<IfDefine SSL>
SSLEngine off
</IfDefine>
DocumentRoot /opt/lampp/htdocs/dir2
ServerName ServerAlias ServerAdmin admin@def.com
ErrorLog /opt/lampp/logs/dir2/error.log
CustomLog /opt/lampp/logs/dir2/access.log common
<Directory /opt/lampp/htdocs/dir2>
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Alias /inc/ /opt/lampp/htdocs/inc/
</VirtualHost>
I've come to the point where I need to ask someone who knows as I am going crazy with this for the past few days.
I am using Apache 2.2.14 installed under XAMPP for Linux on Ubuntu Server. While my apache config shows no hard errors in the error_log the symptoms I am getting as as follows:
1) when I try certain domain names they are intercepted by the main server defintion(default).
2) when I try to access a particular program on a name virtual server the error log shows that the specified program cannot be found (because its looking in the main directory).
I've coded a few sections of my main and virtual server definitions below and while their contents seem to match the reference materials I'm using, I cannot seem to get around the issues explained above.
Hopefully some of you intimately familiar with the configuration of Apache in this environment can enlighten me as to what or how I might be doing something incorrectly and suggest the correct way to do this?
I will be greatly indebted to you all.
Thanks - B
# Define Local/Default Web Service Directives
Listen 80
NameVirtualHost *:80
ServerRoot /opt/lampp
ServerAdmin admin@xyz.com
ServerName 0.xyz.com
DocumentRoot /opt/lampp/htdocs
ErrorLog logs/error_log
LogLevel warn
EnableMMAP off
EnableSendfile off
HostNameLookups off
Alias /inc/ /opt/lampp/htdocs/inc/
# First virtual host
<VirtualHost *>
<IfDefine SSL>
SSLEngine off
</IfDefine>
DocumentRoot /opt/lampp/htdocs/dir1
ServerName ServerAlias ServerAdmin admin@abc.net
ErrorLog /opt/lampp/logs/dir1/error.log
CustomLog /opt/lampp/logs/dir1/access.log common
<Directory /opt/lampp/htdocs/dir1>
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Alias /inc/ /opt/lampp/htdocs/inc/
</VirtualHost>
# Second Virtual Host
<VirtualHost *>
<IfDefine SSL>
SSLEngine off
</IfDefine>
DocumentRoot /opt/lampp/htdocs/dir2
ServerName ServerAlias ServerAdmin admin@def.com
ErrorLog /opt/lampp/logs/dir2/error.log
CustomLog /opt/lampp/logs/dir2/access.log common
<Directory /opt/lampp/htdocs/dir2>
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Alias /inc/ /opt/lampp/htdocs/inc/
</VirtualHost>