Tag Info

Hot answers tagged

37

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 ...


7

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


7

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.


6

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.


6

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 ...


5

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


5

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" ...


5

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


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.


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

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 ...


4

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 & Tomcat. So I prefer allowing Apache to do the heavy lifting of being the first line of defense against access. Apache is ...


3

You do it by using some post-clone steps in your auto-scaling. The exact methods depends on your comfort-levels, but a solution like this would probably do a lot for you: Build your web-directory in something like git. In the AMI, build in a cron-task to git-pull from the repo-server on a schedule. In the AMI, build in a git-pull as part of the on-boot ...


3

After hitting this problem, I found that jetty.state must be writable to the java process. So if you are not running jetty as root, /var/run will not be writable and you'll have this problem. My solution is to create a directory where jetty can write, like /opt/jetty/run and put it into /etc/default/jetty file: JETTY_RUN=/opt/jetty/run/


3

No problems technically speaking. Just run both on different ports, and be mindful of the memory / CPU usage of each. It would be easy for one badly behaving server to use too many resources and starve the other.


3

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

/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

This warning means that your script misses special text comment which specifies services which your service depends on, runlevels on which it should be started or stopped (including ordering), etc. See http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot for particular details on Debian.


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 ...


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

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

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


3

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


2

Have you tried setting setenv proxy-initial-not-pooled 1? Reference here


2

tomcat is older and very stable with solr in combination. jetty is newer and is a bit more complicated to administer. jetty can be configured to run in many ways(embedded, diy by importing the class etc) as opposite to tomcat which has all predefined (logs, scripts, libraries etc). it all depends on your confidence level in the end. i have tomcat and ...



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