You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Arya Farzan <ar...@gmail.com> on 2014/07/25 03:03:40 UTC

Tomcat virtual host shows blank page

Hello

I also asked this on Stackoverflow but no one has commented or answered.

I've been trying to configure tomcat for multiple domains and everything I
have tried was unsuccessful.

I added this to /etc/tomcat7/server.xml

<Host name="www.mysite.com" appBase="webapps/mysite"
            unpackWARs="true" autoDeploy="true">
  <Alias>mysite.com</Alias>
</Host>

and I created the folder /var/lib/tomcat7/webapps/mysite

Whenever I go to my domain all I get is a blank page. What am I doing wrong
here? I am running Debian 7

Re: Tomcat virtual host shows blank page

Posted by Arya Farzan <ar...@gmail.com>.
Thank you. I changed it to your example and now it's working


On Thu, Jul 24, 2014 at 8:35 PM, Igal @ getRailo.org <ig...@getrailo.org>
wrote:

> I prefer to use Context/docBase instead of Host/appBase
>
> try this:
>
> <Host name="www.mysite.com">
>    <Alias>mysite.com</Alias>
>
>    <Context path="" docBase="/var/lib/tomcat7/webapps/mysite" />
> </Host>
>
>
>
>
> On 7/24/2014 6:28 PM, Arya Farzan wrote:
>
>> I just tried this with IE and it says "The webpage cannot be found"
>>
>> in google chrome source is 100% blank
>>
>>
>> On Thu, Jul 24, 2014 at 8:20 PM, Igal Sapir <ig...@getrailo.org> wrote:
>>
>>  Check with view source on the blank page and see if you get anything
>>> there
>>> On Jul 24, 2014 6:16 PM, "Jordan Michaels" <jo...@viviotech.net> wrote:
>>>
>>>  Hi Arya,
>>>>
>>>> Are you using a web server like Apache in front of Tomcat, or are you
>>>> hitting the Tomcat port directly? This will tell us if the problem is
>>>> somewhere in your connector setup or not.
>>>>
>>>> Any clues in your catalina.out log file?
>>>>
>>>> Warm Regards,
>>>> Jordan Michaels
>>>>
>>>> On 07/24/2014 06:03 PM, Arya Farzan wrote:
>>>>
>>>>  Hello
>>>>>
>>>>> I also asked this on Stackoverflow but no one has commented or
>>>>> answered.
>>>>>
>>>>> I've been trying to configure tomcat for multiple domains and
>>>>>
>>>> everything I
>>>
>>>> have tried was unsuccessful.
>>>>>
>>>>> I added this to /etc/tomcat7/server.xml
>>>>>
>>>>> <Host name="www.mysite.com" appBase="webapps/mysite"
>>>>>               unpackWARs="true" autoDeploy="true">
>>>>>     <Alias>mysite.com</Alias>
>>>>> </Host>
>>>>>
>>>>> and I created the folder /var/lib/tomcat7/webapps/mysite
>>>>>
>>>>> Whenever I go to my domain all I get is a blank page. What am I doing
>>>>> wrong
>>>>> here? I am running Debian 7
>>>>>
>>>>>
>>>>>  ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>
> --
> Igal Sapir
> Railo Core Developer
> http://getRailo.org/
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat virtual host shows blank page

Posted by "Igal @ getRailo.org" <ig...@getrailo.org>.
I prefer to use Context/docBase instead of Host/appBase

try this:

<Host name="www.mysite.com">
    <Alias>mysite.com</Alias>

    <Context path="" docBase="/var/lib/tomcat7/webapps/mysite" />
</Host>



On 7/24/2014 6:28 PM, Arya Farzan wrote:
> I just tried this with IE and it says "The webpage cannot be found"
>
> in google chrome source is 100% blank
>
>
> On Thu, Jul 24, 2014 at 8:20 PM, Igal Sapir <ig...@getrailo.org> wrote:
>
>> Check with view source on the blank page and see if you get anything there
>> On Jul 24, 2014 6:16 PM, "Jordan Michaels" <jo...@viviotech.net> wrote:
>>
>>> Hi Arya,
>>>
>>> Are you using a web server like Apache in front of Tomcat, or are you
>>> hitting the Tomcat port directly? This will tell us if the problem is
>>> somewhere in your connector setup or not.
>>>
>>> Any clues in your catalina.out log file?
>>>
>>> Warm Regards,
>>> Jordan Michaels
>>>
>>> On 07/24/2014 06:03 PM, Arya Farzan wrote:
>>>
>>>> Hello
>>>>
>>>> I also asked this on Stackoverflow but no one has commented or answered.
>>>>
>>>> I've been trying to configure tomcat for multiple domains and
>> everything I
>>>> have tried was unsuccessful.
>>>>
>>>> I added this to /etc/tomcat7/server.xml
>>>>
>>>> <Host name="www.mysite.com" appBase="webapps/mysite"
>>>>               unpackWARs="true" autoDeploy="true">
>>>>     <Alias>mysite.com</Alias>
>>>> </Host>
>>>>
>>>> and I created the folder /var/lib/tomcat7/webapps/mysite
>>>>
>>>> Whenever I go to my domain all I get is a blank page. What am I doing
>>>> wrong
>>>> here? I am running Debian 7
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>

-- 
Igal Sapir
Railo Core Developer
http://getRailo.org/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat virtual host shows blank page

Posted by Arya Farzan <ar...@gmail.com>.
I just tried this with IE and it says "The webpage cannot be found"

in google chrome source is 100% blank


On Thu, Jul 24, 2014 at 8:20 PM, Igal Sapir <ig...@getrailo.org> wrote:

> Check with view source on the blank page and see if you get anything there
> On Jul 24, 2014 6:16 PM, "Jordan Michaels" <jo...@viviotech.net> wrote:
>
> > Hi Arya,
> >
> > Are you using a web server like Apache in front of Tomcat, or are you
> > hitting the Tomcat port directly? This will tell us if the problem is
> > somewhere in your connector setup or not.
> >
> > Any clues in your catalina.out log file?
> >
> > Warm Regards,
> > Jordan Michaels
> >
> > On 07/24/2014 06:03 PM, Arya Farzan wrote:
> >
> >> Hello
> >>
> >> I also asked this on Stackoverflow but no one has commented or answered.
> >>
> >> I've been trying to configure tomcat for multiple domains and
> everything I
> >> have tried was unsuccessful.
> >>
> >> I added this to /etc/tomcat7/server.xml
> >>
> >> <Host name="www.mysite.com" appBase="webapps/mysite"
> >>              unpackWARs="true" autoDeploy="true">
> >>    <Alias>mysite.com</Alias>
> >> </Host>
> >>
> >> and I created the folder /var/lib/tomcat7/webapps/mysite
> >>
> >> Whenever I go to my domain all I get is a blank page. What am I doing
> >> wrong
> >> here? I am running Debian 7
> >>
> >>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>

Re: Tomcat virtual host shows blank page

Posted by Igal Sapir <ig...@getrailo.org>.
Check with view source on the blank page and see if you get anything there
On Jul 24, 2014 6:16 PM, "Jordan Michaels" <jo...@viviotech.net> wrote:

> Hi Arya,
>
> Are you using a web server like Apache in front of Tomcat, or are you
> hitting the Tomcat port directly? This will tell us if the problem is
> somewhere in your connector setup or not.
>
> Any clues in your catalina.out log file?
>
> Warm Regards,
> Jordan Michaels
>
> On 07/24/2014 06:03 PM, Arya Farzan wrote:
>
>> Hello
>>
>> I also asked this on Stackoverflow but no one has commented or answered.
>>
>> I've been trying to configure tomcat for multiple domains and everything I
>> have tried was unsuccessful.
>>
>> I added this to /etc/tomcat7/server.xml
>>
>> <Host name="www.mysite.com" appBase="webapps/mysite"
>>              unpackWARs="true" autoDeploy="true">
>>    <Alias>mysite.com</Alias>
>> </Host>
>>
>> and I created the folder /var/lib/tomcat7/webapps/mysite
>>
>> Whenever I go to my domain all I get is a blank page. What am I doing
>> wrong
>> here? I am running Debian 7
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat virtual host shows blank page

Posted by Hassan Schroeder <ha...@gmail.com>.
On Thu, Jul 24, 2014 at 6:25 PM, Arya Farzan <ar...@gmail.com> wrote:

> I am using Tomcat by itself. It is pretty much a default installation using
> apt-get on Debian.

Error #1 - dump that and install a real Tomcat.

> I changed the port from 8080 to port 80

Error #2 - don't run Tomcat as root; use jsvc, a proxy server, iptables,
whatever to run as a non-privileged user.

Not the cause of your immediate problem, but don't do it. :-)

You should also supply the Java version you're using after you fix
Error #1 (if you have further questions).

-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat virtual host shows blank page

Posted by Arya Farzan <ar...@gmail.com>.
Hi Jordan

I am using Tomcat by itself. It is pretty much a default installation using
apt-get on Debian. The only changes I made are:

I changed the port from 8080 to port 80
And I changed AUTHBIND=no to AUTHBIND=yes


On Thu, Jul 24, 2014 at 8:16 PM, Jordan Michaels <jo...@viviotech.net>
wrote:

> Hi Arya,
>
> Are you using a web server like Apache in front of Tomcat, or are you
> hitting the Tomcat port directly? This will tell us if the problem is
> somewhere in your connector setup or not.
>
> Any clues in your catalina.out log file?
>
> Warm Regards,
> Jordan Michaels
>
>
> On 07/24/2014 06:03 PM, Arya Farzan wrote:
>
>> Hello
>>
>> I also asked this on Stackoverflow but no one has commented or answered.
>>
>> I've been trying to configure tomcat for multiple domains and everything I
>> have tried was unsuccessful.
>>
>> I added this to /etc/tomcat7/server.xml
>>
>> <Host name="www.mysite.com" appBase="webapps/mysite"
>>              unpackWARs="true" autoDeploy="true">
>>    <Alias>mysite.com</Alias>
>> </Host>
>>
>> and I created the folder /var/lib/tomcat7/webapps/mysite
>>
>> Whenever I go to my domain all I get is a blank page. What am I doing
>> wrong
>> here? I am running Debian 7
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat virtual host shows blank page

Posted by Jordan Michaels <jo...@viviotech.net>.
Hi Arya,

Are you using a web server like Apache in front of Tomcat, or are you 
hitting the Tomcat port directly? This will tell us if the problem is 
somewhere in your connector setup or not.

Any clues in your catalina.out log file?

Warm Regards,
Jordan Michaels

On 07/24/2014 06:03 PM, Arya Farzan wrote:
> Hello
>
> I also asked this on Stackoverflow but no one has commented or answered.
>
> I've been trying to configure tomcat for multiple domains and everything I
> have tried was unsuccessful.
>
> I added this to /etc/tomcat7/server.xml
>
> <Host name="www.mysite.com" appBase="webapps/mysite"
>              unpackWARs="true" autoDeploy="true">
>    <Alias>mysite.com</Alias>
> </Host>
>
> and I created the folder /var/lib/tomcat7/webapps/mysite
>
> Whenever I go to my domain all I get is a blank page. What am I doing wrong
> here? I am running Debian 7
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org