Contex
Well-known member
XenForo 1.1.3
Hello, I recently moved my website to a new hosting service and I'm currently using Nginx instead of Apache.
Everything was working fine before the move, but now I seem to get some kind of issue when saving a template, there are no errors in the XenForo server log but I assume I've setup the server block in Nginx wrong, because it keeps returning the same error in the log:
And here's the access log:
Here's my server block in Nginx:
As a side note, editing the .css files works fine without any issues, it's just the templates.
What am I doing wrong?
Hello, I recently moved my website to a new hosting service and I'm currently using Nginx instead of Apache.
Everything was working fine before the move, but now I seem to get some kind of issue when saving a template, there are no errors in the XenForo server log but I assume I've setup the server block in Nginx wrong, because it keeps returning the same error in the log:
Code:
2012/07/17 09:06:56 [error] 13512#0: *84929 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: IP, server: domain.com, request: "POST /admin.php?templates/save-multiple.json HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "domain.com", referrer: "http://domain.com/admin.php?templates/message_user_info.944/edit&style_id=10"
2012/07/17 09:06:56 [error] 13512#0: *84929 open() "/home/contex/sites/unavailable/public/index.html" failed (2: No such file or directory) while sending to client, client: IP, server: domain.com, request: "POST /admin.php?templates/save-multiple.json HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "domain.com", referrer: "http://domain.com/admin.php?templates/message_user_info.944/edit&style_id=10"
And here's the access log:
Code:
IP - - [17/Jul/2012:09:37:03 +0000] "POST /admin.php?templates/save-multiple.json HTTP/1.1" 499 0 "http://domain.com/admin.php?templates/message_user_info.944/edit&style_id=10" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11"
Here's my server block in Nginx:
Code:
server {
listen 80; # Listen on port 80 for IPv4 requests
server_name domain.com;
server_tokens off;
root /home/contex/sites/domain.com/web/public;
index index.html index.htm index.php;
access_log /home/contex/sites/domain.com/web/logs/access/access.log combined;
error_log /home/contex/sites/domain.com/web/logs/error/error.log error;
error_page 502 503 @unavailable;
client_max_body_size 100m;
# Set expiration information for assets
location ~ \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ {
#expires max;
log_not_found off;
}
location / {
try_files $uri $uri/ /index.php?$uri&$args;
index index.php index.html;
}
location /internal_data/ {
internal;
}
location /library/ {
internal;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
location @unavailable {
root /home/contex/sites/unavailable/public;
rewrite ^(.*)$ /index.html break;
}
}
As a side note, editing the .css files works fine without any issues, it's just the templates.
What am I doing wrong?