Hot answers tagged

53

I have solved the problem. The KeepAlive=On should be inserted into ProxyPass config line: ProxyPass / http://www.dom.fi:8080/ retry=1 acquire=3000 timeout=600 Keepalive=On See that Keepalive=On there? It is critical ;)


11

Found it! You need: - JETTY_HOST=0.0.0.0 to listen to other hosts. So a minimal /etc/default/jetty file includes: - JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun NO_START=0 JETTY_HOST=0.0.0.0 JETTY_PORT=8080


9

You have to enable the GzipFilter to make Jetty return compressed content. Have a look here on how to do that: http://blog.max.berger.name/2010/01/jetty-7-gzip-filter.html You can also use the gzip init parameter to make Jetty search for compressed content. That means if the file file.txt is requested, Jetty will watch for a file named file.txt.gz and ...


8

<Set name="headerBufferSize">65536</Set> is now deprecated. You can use: <Set name="requestHeaderSize">65535</Set> instead.


8

You need to use the ProxyPass ! argument with a path, not in a <Location> block, for example: ProxyPass /static ! ProxyPass / http://localhost:8081/ ProxyPassReverse / http://localhost:8081/ I believe these rules are processed in the order they appear in the config, so be sure to specify exclude rules first.


7

A little late to the party, but I've just come up against the same problem. Add the following to the connectors section of jetty.xml: <Set name="headerBufferSize">65536</Set> This will increase the header limit from the default of 4KB to 64KB.


7

You should be creating an init service. Ubuntu uses upstart. http://upstart.ubuntu.com/


7

Unfortunately, the answer is: you can't. Today, in order to deploy SPDY, your TLS termination server (which in this case is the ELB), needs to be able to negotiate SPDY over TLS "Next Protocol Negotiation" (NPN). NPN is an extension to TLS and requires a recent version of OpenSSL or other libraries.. ELB does not support NPN negotiation. The solution is to ...


6

You really don't want to disable keep-alive. Your server performance will suffer, for starters. Your clients will experience slower loading times. In rare cases, you may even get fired. Don't even THINK about doing this on a production web site. If you're just testing, you can set the HTTP header Connection: Close. <Configure id="Server" class="org....


5

My current preferred stack is to use nginx as a replacement for Apache. Wherever necessary, php-fpm fills in the need for PHP. Such a setup has worked nicely for deploying apps such as Rails, Magento and SugarCRM.


5

ok i solved it by: creating a contexts folder at the same level as the www folder. creating the following domain2.xml file in the contexts folder (don't forget to add the xml header) 'put the xml header here' <!-- ================================================================== Configure and deploy the test web application in $(jetty.home)/...


5

You need to install java-1.6.0-openjdk-devel as well.


5

I know you are using Jetty, but I have a method using Tomcat that works and will explain below. Basically, I have given up trying to understand what I perceive as excessively obtuse ways Java web apps protect themselves in Jetty and Tomcat. So I prefer allowing Apache to do the heavy lifting of being the first line of defense against access. Apache is solid ...


4

Glassfish will be more scalable than Tomcat because it uses Grizzly (NIO based). You don't have many options other than a variation of Tomcat, Jetty, or Glassfish because of the Java requirement. PHP can be run using Quercus, but it may be better to just deploy it using Nginx.


4

Look into something like mod_jk. It will allow you to connect an Apache instance to a JAS running on a separate port. Or, you could just setup Jetty to use port 80...


4

Connection: Keep-Alive is only used by HTTP/1.0 clients. The HTTP/1.1 protocol specifies that all connections are persistent by default. According to the response to this bug (from 2008), since it claims: Jetty uses persistent connections by default for HTTP/1.1 and if requested by the client for HTTP/1.0. Jetty should respond with a Connection: Keep-...


4

SPDY is supported now on ELB with use of proxy_protocol. It's a bit fiddly to set up however, you need to add the ProxyProtocol policy to you ELB and set the listeners to TCP 443 -> TCP 443 This will pass the connection (along with the proxy-protocol header) through the ELB untouched to your servers. Nginx has just added proxy-protocol support in version ...


4

You can use the IPAccessHandler that is in jetty 7, 8 and 9 http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/server/handler/IPAccessHandler.html you would wire this up in the handler chain so that it is executed before anything else in the handler chains [edit] also look at the jetty-ipaccess.xml file under $jetty.home/etc http://git....


4

Can you try the following steps? Make sure that the nginx.conf file in parent nginx directory has the include directive pointing to the default file in the sites-available directory If you need to proxy to another service (e.g. jetty), use the upstream option (in the sites-available/default file) as shared below. You can refer to the upstream from the ...


3

Did you read the Jetty documentation? Glassfish does it by attaching the certificates to the HTTP(S) listeners, which are then in turn bound to a server instance. According to the documentation, the way Jetty does it is pretty similar: http://docs.codehaus.org/display/JETTY/Virtual+hosts You simply configure your vhosts (make them IP based, SSL is ...


3

All the comet solutions rely on holding the connection between the webserver open as long as possible, either by the client making a POST request and then delaying sending the data, or the server sending a GET response, again delaying the data. Both of those have similar problems for the origin, namely consuming a socket and memory per connection, and ...


3

http://serverfault.com/questions/56691/whats-the-maximum-url-length-in-tomcat


3

You can do so by setting an error page. error_page 502 =503 /maintenance.html


3

/etc/profile.d is used so you can break out some of the setting that go in profile. For instance instead of putting settings for vi in /etc/profile, I can put them in /etc/profile.d/vi Per the comment at the top of /etc/profile # /etc/profile # System wide environment and startup programs, for login setup # Functions and aliases go in /etc/bashrc # It's ...


3

I think I figured it out myself. What I did was, inside the example directory, rename webapps/solr.war to webapps/foobar.war Also, I changed a line in solr/conf/scripts.conf to webapp_name=foobar


3

Stop Solr Go to the directory where you run "java -jar start.jar" mkdir work java -jar start.jar It seems that Jetty will use the work directory if it exists, otherwise it uses /tmp


3

I won't have the final word on this, but I just had the same problem while running Jenkins (it contains Hudson). Hudson uses Jmdns to implement a service discovery on the local network (via broadcast). I believe Hudson panics when something not from its planet answers. I don't know how to make it happy about it, but, in my case, I disabled that feature. ...


3

I think that the pattern is matching only the URI. You should use something like: <New id="forwardedHttps" class="org.eclipse.jetty.rewrite.handler.ForwardedSchemeHeaderRule"> <Set name="header">X-Forwarded-Scheme</Set> <Set name="headerValue">https</Set> <Set name="scheme">https</Set&...



Only top voted, non community-wiki answers of a minimum length are eligible