On 12/2/13 14:10 , Sönke Ludwig wrote:

Am 02.12.2013 13:18, schrieb Sönke Ludwig:

Am 02.12.2013 12:56, schrieb YiannisOSC:

Hello,
I am trying to deploy a vibe.d application on a VPS. It is running
behind Nginx which i tried to configure according to some examples in here.

The first time i had some :
Content Encoding Error The page you are trying to view cannot be shown
because it uses an invalid or unsupported form of compression, errors
with firefox.
I disabled the compression in vibe.d (which i think is default behavior
in the new version).
Then my site was working but i get broken html code (Head is messed up
,most links appear in the body and some symbols appear on the pages).
I am not sure if the problem is at Nginx configuration (i placed charset
utf-8; and tried some more options) or at vibe.d.
I d try and save files encoded with utf-8 without BOM but i guess this
is not the case since diet templates are not text files.

When i run my application locally (no nginx) everything seems to be fine.
I am a bit confused where to focus to solve this some help would be great.

Thanks for the report, looks like I finally have a way to reproduce the
content encoding error. I'll look into both issues.

I've tested with the vibe.d "diet" example (GIT master) + nginx 1.1.19.
useCompressionIfPossible is set to true, But I can neither get the
content encoding error, nor malformed HTML output. Which versions
exactly do you use? Can you share your failing code as a reproduction case?

I tried the diet example.
I get the malformed html output error. (I tried also locally and it does
not).
...
391

<!DOCTYPE html>
<html lang="en">

<head>
	<title>pageTitleX&lt;Y&gt; </title>
</head>
<body>
	<h1 id="caption">Diet test page 4X</h1>
	<p class="first">
		<b>First Paragraph!</b>
	</p>
	<p style="color: red;" class="HELLO">This
		<br/>
		<b>is</b>
		<br/>
		<b>a test</b>
		<em>156</em>

One line of text <Phew!>
Another line of text

</p>
<div id="sanity" style="background-color: lightgreen">
	<p>
		<b>Everything OK! (0)
			<br/>
		</b>
		...
                         ...

	</p>
</div>

</body>
</html>
0
...

Some maybe useful info:

$ curl -I http://mydomain.com
HTTP/1.1 301 Moved Permanently
Server: nginx/0.8.53
Date: Mon, 02 Dec 2013 15:33:43 GMT
Content-Type: text/html
Content-Length: 185
Connection: keep-alive
Location: http://mydomain.com

also :
/etc/init.d/nginx: line 13: ulimit: open files: cannot modify limit:
Invalid argument
Starting httpd-psXXXXX webserver... already running!locale failed.
perl: warning: Please check that your locale settings:

 LANGUAGE = (unset),
 LC_ALL = (unset),
 LC_COLLATE = "C",
 LC_CTYPE = "UTF-8",
 LANG = (unset)
 are supported and installed on your system.

perl: warning: Falling back to the standard locale ("C").
user: OK done!

It is a dreamhost VPS so they have php settings and other things enabled
for the nginx .

Local machine is Mac OSX 10.8.5
I compile the app on a virtual machine Debian 7.2 32bit (runs also there
without errors but there is no nginx installed).
The VPS is Debian 7.2 64bit. nginx 0.8.53

vibe.d is always upgraded master version.