I have Apache Tomcat 6.0.35(Wndows 2008) with a bunch of application installed.
I have deleted webapps\ROOT*, renamed my application to ROOT.war, deployed and now I have my application as a root(the following URLs are used in the applications - http:/exampleapp.com/, http:/exampleapp.com/SomePostUri). Port 8080 changed to 80.
How I can forbid access(via HTTP) to the following applications:
1) Tomcat's Manager application (http:/exampleapp.com/manager/html) - allow access only from localhost.
2) All others installed web applications (e.g. http:/exampleapp.com/docs) - allow access only from localhost.
?
I installed Apache HTTP and joined it with Tomcat via mod_jk.
Solved.
Related
I have a CRA project running which in development mode (yarn start) is slow because of multiple requests being fired and many requests are stale for a long time. In production (deployed on an Apache server) this problem of stale requests holding back future requests is solved.
A difference I can spot is the localhost to api endpoint via a proxy configuration in package.json is running over HTTP/1 and the deployed variant runs over HTTP/2 which allow more requests to be handled simultaneously.
Does this theory of HTTP/1 over 2 makes any sense for my problem?
I can't find a way to allow my localhost to proxy over HTTP/2 to my remote server.
I am trying to deploy an entire application that is build in ReactJS Frontend and Spring Backend. The backend that is serving APIs is already deployed in the server using WildFly.
My question is can I install NGINX on the same server to host the ReactJS frontend?
Yes, you can install NGINX and WildFly on the same server.
In such a scenario, typically NGINX is configured as 'reverse proxy'.
For example, when your WildFly is listening on port 8080, you make an NGINX configuration like:
server {
listen 80;
server_name _;
index index.html;
location / {
root /path/to/var/www/yourSite;
}
location /YourAPIRoot/ {
proxy_pass http://localhost:8080/YourAPIRoot/;
}
}
See also
Nginx both serving static files and reverse proxy a gunicorn server - serverfault
Part 2.2 - Install Nginx and configure it as a reverse proxy server - Microsoft Docs
Module ngx_http_proxy_module - nginx.org
I'm running GAE dev server within a Vagrant guest precise64 box with the following network setup (in my Vagrantfile):
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.network :forwarded_port, guest: 8080, host: 9090
end
Which does its thing:
[default] Forwarding ports...
[default] -- 8080 => 9090 (adapter 1)
I start my App Engine server with:
goapp serve
or
dev_appserver.py myappfolder
This starts app engine dev server as expected:
INFO 2013-11-22 dispatcher.py] Starting module running at: http://localhost:8080
In all cases, I'm able to ssh in to the Vagrant guest and curl localhost:8080 successfully.
Unfortunately, from the host I'm unable to get a response from localhost:9090 when running GAE dev web server. Additionally, I've made sure that I don't have anything interfering with the port 9090 on the host machine. Also, I'm almost positive this isn't related to Vagrant as I spun up a quick node.js web server on 8080 and was able to reach it from the host. What am I missing?!!!
You must run the Google App Engine Go dev web server on 0.0.0.0 when leveraging Vagrant port forwarding. Like so:
goapp serve -host=0.0.0.0
See the answers here for more info on ensuring the guest web server is not bound to 127.0.0.1 which is loopback. Web servers that bind to 127.0.0.1 (like App Engine Go dev web server does) by default should be overridden to use 0.0.0.0.
I am using Check_MK based monitoring on Nagios.
Check_MK Version: 1.2.0p4
OS: Linux
Nagios Core 3.2.3
I want to fetch the Nagios page of remote server to local server using MK Livestatus.
I am curious, How could I achieve this?
Nagios Check_mk Multisite (plugin)
This plugin allow user to view/manage distributed nagios using single Web based Interface.
However by default it doesn’t support pnp4nagios graphs (hosts/services from remote nagios) access using (single) Multisite URL.
To access PNP4nagios graphs of hosts/services from remote nagios using (single) Multisite URL, we need to Add Apache Proxy redirect setting.
multisite.mk Conf file-
This is my “check_mk/multisite.mk” conf file. (from Primary multisite Server (production server), SITE1 and SITE2 are two remote nagios)
OMD[production]:~$ cat etc/check_mk/multisite.mk
…
….
sites = {
#Primary site
“local” : {
“alias” : “PRODUCTION”
},
# Remote site
“SITE1″: {
“alias”: “SITE1″,
“socket”: “tcp:XXX.XXX.X.XX:6557″,
“url_prefix”: “/SITE1/”,
“nagios_url”: “/SITE1/nagios”,
“nagios_cgi_url”: “/SITE1/nagios/cgi-bin”,
“pnp_url”: “/SITE1/pnp4nagios”,
},
# Remote site
“SITE2″: {
“alias”: “SITE2″,
“socket”: “tcp:XXX.XXX.X.XX:6557″,
“url_prefix”: “/SITE2/”,
“nagios_url”: “/SITE2/nagios”,
“nagios_cgi_url”: “/SITE2/nagios/cgi-bin”,
“pnp_url”: “/SITE2/pnp4nagios”,
},
}
….
…..
OMD[production]:~$
After making the changes in multisite.mk file the MK Livestatus of remote nagios will be visible at local site.
I have Apache2 SSL which is fronting Spring webapp as follows:
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
All works fine... i mean all links ... are correct, and in general webapp works, so the problem is not a matter of an application or SSL..
Except starting/cancelling webflows: they produce http URLs instead of https://
I found one topic here:
forum.springsource.org/showthread.php?70730-Webflow-2-0-and-reverse-proxy
They say it is not a problem of Spring WebFlow...
What is a workaround in this situation?
Providing that all requests to the Tomcat connector are received via SSL terminated at httpd then you can add the following to your connector:
scheme="https" secure="true"
This tells Tomcat to treat the connection as if it was received over an SSL connection direct to Tomcat. This is required when proxying over http since there is no mechanism within http to pass the SSL info to Tomcat. There are ways to pass some of this info via http headers. Look at the SSLValve docs in Tomcat.
Alternatively, using AJP will work since AJP passes SSL information from httpd to Tomcat.