vitualhost and name based site problem
Posted: 15. February 2011 16:17
Hi,
I am using Xampp-Apache for windows.
I have configured mydomain.com(on port 80) and xy.mydomain.com(port 8080) on single IP
mydomain.com is having plain static html site and is working perfectly.
xy.mydomain.com is a webapp written on Java and running on tomcat port 8080
when I run tomcat application on local host my URL is http://localhost:8080/myapplication
I would like above URL should work only in - http://xy.mydomain.com
Is it possible then pls help me in configuration setting.
httpd.conf setting is-- please verify below content for security purpose also
Listen 80
Listen 8080
NameVirtualHost *:80 *:8080
<VirtualHost *:80 *:8080>
ServerName http://www.mydomain.com
ServerAlias mydomain.com *.mydomain
DocumentRoot D:/xampp/htdocs/mydomain
<Directory "D:/xampp/htdocs/mydomain">
AllowOverride All
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80 *:8080>
ServerName http://www.xy.mydomain
ServerAlias xy.mydomain.com *.xy.mydomain.com
DocumentRoot D:/xampp/tomcat/webapps/myapplication
DirectoryIndex main.html main.swf
<Directory "D:/xampp/tomcat/webapps/myapplication">
AllowOverride None
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Thanks in Advance
I am using Xampp-Apache for windows.
I have configured mydomain.com(on port 80) and xy.mydomain.com(port 8080) on single IP
mydomain.com is having plain static html site and is working perfectly.
xy.mydomain.com is a webapp written on Java and running on tomcat port 8080
when I run tomcat application on local host my URL is http://localhost:8080/myapplication
I would like above URL should work only in - http://xy.mydomain.com
Is it possible then pls help me in configuration setting.
httpd.conf setting is-- please verify below content for security purpose also
Listen 80
Listen 8080
NameVirtualHost *:80 *:8080
<VirtualHost *:80 *:8080>
ServerName http://www.mydomain.com
ServerAlias mydomain.com *.mydomain
DocumentRoot D:/xampp/htdocs/mydomain
<Directory "D:/xampp/htdocs/mydomain">
AllowOverride All
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80 *:8080>
ServerName http://www.xy.mydomain
ServerAlias xy.mydomain.com *.xy.mydomain.com
DocumentRoot D:/xampp/tomcat/webapps/myapplication
DirectoryIndex main.html main.swf
<Directory "D:/xampp/tomcat/webapps/myapplication">
AllowOverride None
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Thanks in Advance