You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Neil Aggarwal <ne...@propfinancing.com> on 2022/01/05 22:27:28 UTC
How to do a catch-all Host?
Hello all:
If I access a simple html file from the command line
using lynx:
lynx http://127.0.0.1:8080/www/
I get the page and this entry in the localhost_access_log:
0:0:0:0:0:0:0:1 - - [05/Jan/2022:16:21:22 -0600] "GET /www/index.html
HTTP/1.0" 200 19
But if I try to do that through the web by visiting
http://dev.propfinancing.com/www/index.html
I get a Forbidden page. I see this in the localhost_access_log:
nn.nnn.nnn.nnn - - [05/Jan/2022:16:21:46 -0600] "GET /www/index.html
HTTP/1.1" 403 619
I tried to set my Host tag in server.xml to capture everything:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Alias>*</Alias>
Any idea what I did wrong?
Thank you,
Neil
--
Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com
We offer 30 year loans on single family houses!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: How to do a catch-all Host?
Posted by Neil Aggarwal <ne...@propfinancing.com>.
Chris:
I figured out the problem.
I put quotes around the secret in workers.properties since I had
copied and pasted it from server.xml.
I removed them and everything worked.
Thanks for your help!
Thank you,
Neil
--
Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com
We offer 30 year loans on single family houses!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: How to do a catch-all Host?
Posted by Neil Aggarwal <ne...@propfinancing.com>.
Christopher:
> What is the defaultHost for the <Engine>?
It is localhost.
> ... which means it should already be the default (catch-all) host.
> 403 means "unauthorized" which could mean something other than "I can't
> find the host".
Ahh. Got it.
> What are the contents of the pare returned to the web
> browser when you get that 403?
Pare? I am not sure what you mean, please give me more details on
how to get what you want.
> With a domain name like "propfinancing", please also make sure to get
> the TLS working properly ;)
Yes, eventually!
Thank you,
Neil
--
Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com
We offer 30 year loans on single family houses!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: How to do a catch-all Host?
Posted by Christopher Schultz <ch...@christopherschultz.net>.
Neil,
On 1/5/22 17:27, Neil Aggarwal wrote:
> Hello all:
>
> If I access a simple html file from the command line
> using lynx:
> lynx http://127.0.0.1:8080/www/
>
> I get the page and this entry in the localhost_access_log:
> 0:0:0:0:0:0:0:1 - - [05/Jan/2022:16:21:22 -0600] "GET /www/index.html
> HTTP/1.0" 200 19
>
> But if I try to do that through the web by visiting
> http://dev.propfinancing.com/www/index.html
>
> I get a Forbidden page. I see this in the localhost_access_log:
> nn.nnn.nnn.nnn - - [05/Jan/2022:16:21:46 -0600] "GET /www/index.html
> HTTP/1.1" 403 619
>
> I tried to set my Host tag in server.xml to capture everything:
>
> <Host name="localhost" appBase="webapps"
> unpackWARs="true" autoDeploy="true">
> <Alias>*</Alias>
>
> Any idea what I did wrong?
What is the defaultHost for the <Engine>?
It's usually:
<Engine defaultHost="localhost">
... which means it should already be the default (catch-all) host.
403 means "unauthorized" which could mean something other than "I can't
find the host".
Note that your (successful) curl command is connecting to host:8080 and
your "through the web" URL doesn't have a port number, so it will be
using port 80. What are the contents of the pare returned to the web
browser when you get that 403?
With a domain name like "propfinancing", please also make sure to get
the TLS working properly ;)
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org