-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Root-less+FreeBSD+Nginx as proxy #147
Comments
I can also confirm that problem ALSO occurs on local computer running Arch Linux x64_86 Both when running vibe or sudo vibe Nginx config for proxy:
Same errors as in first bug report. Are there any special headers required in order to make vibed working? |
Ok I figured out what is causing the problem. Adding PS
I will open another issue a bit later today |
I forgot to investigate the "Content-Length" problem (James Miller already stumbled over it in the past before posting the first working configuration on the D newsgroup). It's good to have a ticket for this - it'll look into it as soon as there is some time. Regarding the libev driver - it was more or less just a test to see if it performs better than the libevent driver. However, although according to various benchmarks that should be the case, I never could get it up to speed and probably used in in the wrong way... That's why it has been rotting there unmaintained for some time. It shouldn't take too much to get it working, though - I'll look into it. |
Forgot to mention that I've added a configuration to the wiki: https://github.com/rejectedsoftware/vibe.d/wiki/Setting-up-Nginx-as-a-reverse-proxy |
…See issue #147. The HTTP server erroneously assumed that a body is following a request with "Connection: close", even in the absence of "Content-Length" or "Transfer-Encoding". While this can be true for HTTP 1.0 clients, the HTTP 1.1 standard explicitly requires one of these headers to indicate a body.
Ach that is ok then (regarding backends). @s-ludwig is it possible to run this setup, nginx + vibe without modyfing (adding content-lenght or proxy_set_body) Nginx config files? I mean here mostly rootless scenarios. It would be cool if it was possible to run Vibe in environments without root access like you do with PHP, Ruby etc. Also I wonder if it would be possible to make install script less root-oriented or add set of install files without a need of root access. Or atleast make wiki entry about installing Vibe without root access. Thank you very much for all this work. Vibe is really great, high quality product. I am happy user of it on rootless FreeBSD now ;) |
Regarding non-root installation, there is basically nothing to do. Just clone/unzip and call /path/to/vibe.d/bin/vibe directly or add it to the user's PATH. But it's only mentioned on the github project page, so I'll also state that in the general documentation and in the FreeBSD section. Hm... wiki page for installation instructions is probably an even better idea... bc2e0f3 should have made both configuration options, the content-length header and the proxy_set_body, superfluous now. But I have tested it only briefly with a simple GET request. |
@s-ludwig yea I noticed your commit with fix, but I was not sure that's why I asked. Still seems to not work properly.
From Git head. |
Can you run the app using Fir me it works on nginx 1.1.19 and the upload example using these settings:
|
Ach indeed it works! Adding |
@s-ludwig I had very unfriendly nginx conf here at localhost hehe
Not sure what configs were running on my shell tho (can't test it anymore because Administrators added Content-length header to config) I guess I can close the issue now right? |
Lets keep it still open for a while - lets me remember the backend thing, but above all I need to investigate if that HTTP 1.0 exception which still causes the hang now without the 1.1 is really necessary. (1.1 is necessary either way, though, because some parts rely on the ability to send using chunked encoding) |
Alrighty! Thanks alot. |
…request body. This was causing non-conformant behavior infavor of broken clients. See issue #147.
Okay, I'll close this for now. HTTP/1.0 exception is removed now and the libev driver compiles again. I'll put a TODO item for making it actually work again, but that'll have to wait a bit more. |
Greetings.
I am trying to use Vibe.d on shared hosting. I haven't got root access but I am allowed to listen on ie port 2500. I managed to install it with few changes in build-freebsd.sh
The server with vibe.d on it is running FreeBSD 9.1 64bits.
Then, nginx listening on other machine forwards request from http://up.dzfl.pl to http://mdweb.mydevil.net:2500/
While accessing site directly http://mdweb.mydevil.net:2500/ everything works fine, but when trying to access it from http://up.dzfl.pl errors pop-ups.
Browser pop-ups following message:
Vibe.d spits following message:
Full vibe.d output:
I can't provide Nginx configs as for now (I will pm admins of server so maybe I can provide them later).
Although simple HttpServer either in Python (
python -m SimpleHTTPServer 2500
) or Java (quick implementation) works fine.I am using DMD Head from Github and Vibed Head from Github
Best regards
Damian Ziemba
The text was updated successfully, but these errors were encountered: