ethercalc
ethercalc copied to clipboard
Problem when creating New Calc from New Button
Hello from France !
When i want to create a new Calc from the button of the main page, i got an error : the url which is returned don't work, there is not the subdirectory...
Other way, creating a new Calc directly from an url, works
This is my nginx configuration :
#Gestion d ethercalc
location ~ /\.
{
deny all;
}
location ~ /ethercalc/edit$
{
proxy_pass http://127.0.0.1:8000;
auth_basic "Editor Only";
auth_basic_user_file .htpasswd;
}
location /ethercalc
{
return 301 $scheme://$server_name$request_uri/;
}
location /ethercalc/
{
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 600s;
proxy_connect_timeout 75s;
proxy_pass http://127.0.0.1:8000;
rewrite /ethercalc(/.*) $1 break;
}
location /ethercalc/socket.io
{
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 600s;
proxy_connect_timeout 75s;
proxy_pass http://127.0.0.1:8000;
rewrite /ethercalc(/.*) $1 break;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
location /zappa/socket/__local/ {rewrite (.*) /ethercalc;}
Any idea ?
Many Thanks !
!
The extra sub folder can cause a problem. I have seen a few people post about it.
There are a few posts on this issue. You could try searching to find similar posts and compare notes with others.
If you find the correct solution, it would be worth adding the details to the wiki.
I haven't looked in to this too much but either one or both of these rewrite rules may be making the issue.
location /ethercalc
{
return 301 $scheme://$server_name$request_uri/;
}
or
location /ethercalc/
{
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 600s;
proxy_connect_timeout 75s;
proxy_pass http://127.0.0.1:8000;
**rewrite /ethercalc(/.*) $1 break;**
}