Comments (11)
Just in case anyone else wants to know how to get this working on their Apache webserver, I figured it out.
Tweak the following to suit your setup.
DocumentRoot /var/www/
<Directory /var/www/>
allow from all
Options FollowSymLinks
Require all granted
SetEnv no-gzip
RewriteEngine on
# Make sure the browser supports gzip encoding before we send it
# without it, Content-Type will be "application/x-gzip"
RewriteCond %{HTTP:Accept-Encoding} \b(x-)?gzip\b
RewriteCond %{REQUEST_FILENAME}.gz -s
RewriteRule ^(.+) $1.gz [L]
# Also add a content-encoding header to tell the browser to decompress
<FilesMatch .gz$>
ForceType application/json
Header set Content-Encoding gzip
</FilesMatch>
</Directory>
Edit - I forgot to note that this needs the HEADERS and REWRITE mods for Apache enabled.
from bluemap.
Oh god no! This is intended! :D
The files are saved as .gz to save space (a lot!!) and are sent by the webserver directly using the Content-Encoding: gzip
header, so the browser extracts them on the fly..
You can setup your webserver so it does that:
with nginx there is the setting gzip_static always;
you can use for the .gz files
and apache can do that as well im sure.
Please don't extract them, they will be up to 20x as big xD
from bluemap.
@Sciroccogti Since i am not an apache expert myself, all i can offer you currently is this:
https://coderwall.com/p/sx-8xa/serving-pre-compressed-assets-through-apache
the difference would be that its .json.gz files in our case..
maybe you can adapt from that
from bluemap.
At least there should be an option to generate the non gz versions of the files
from bluemap.
I will add that to the config
from bluemap.
Added with 3b53932
from bluemap.
Oh god no! This is intended! :D
The files are saved as .gz to save space (a lot!!) and are sent by the webserver directly using theContent-Encoding: gzip
header, so the browser extracts them on the fly..You can setup your webserver so it does that:
with nginx there is the settinggzip_static always;
you can use for the .gz files
and apache can do that as well im sure.Please don't extract them, they will be up to 20x as big xD
I think you should notice those who use self hosted webservers to turn the gzip_static
option on 😄!
I 'm new to Apache, and I couldn't have my map hosted correctly until I found this issue. Maybe more guys will run into this problem.
Thanks! Anyway it's a great mapping tool!
Update: I still don't know how to configure the Apache to host the map correctly. Of course it's not your fault, but I'll appreciate it if there's any help.
from bluemap.
@TBlueF It's very kind of you to offer the tutorial, but it's still not working.
I have now switched to Nginx, however it turns out that my website is not working yet.
I'm sorry to bother you, but could you PLZ have a look at my conf in nginx/sites-enabled/
?
server {
listen 80;
listen [::]:80;
server_name map.sciroccogti.top;
root /path/to/BlueMap/web/;
index index.html;
gzip on;
gzip_static on;
gzip_http_version 1.1;
gzip_disable "MSIE [1-6]\.";
gzip_vary on;
gzip_proxied expired no-cache no-store private auth;
#gzip_types text/plain text/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/json;
#return 301 https://$server_name$request_uri;
location / {
try_files $uri $uri/ =404;
}
}
BTW, I noticed that gzip over ssl is not safe, is that true?
from bluemap.
@Sciroccogti Sorry, i can and will not help you here with bluemap unrelated issues.
Also, the "gzip over ssl is not safe" link you posted links to an issue with nginx from 2014 that has been resolved.
from bluemap.
@TBlueF That's OK. Thanks anyway.
from bluemap.
I figured it out. The lines about location
make the server no working. The successful conf is list below:
server {
listen 80;
listen [::]:80;
server_name map.sciroccogti.top;
root /path/to/BlueMap/web/;
index index.html;
gzip off;
gzip_static on;
gzip_proxied expired no-cache no-store private auth;
}
from bluemap.
Related Issues (20)
- Forge 1.20.1 - Modules flow.math and bluemap export package com.flowpowered.math.vector to module - 3.20/4.0 tested
- Add support for dimension-data stored directly into the level.dat (probably forge being weird?) HOT 5
- Question: How to get rid of the black/pink-checkered blocks on my map? HOT 1
- Render just stops? HOT 5
- Render Errors with Older World HOT 3
- Entire screen flickering HOT 10
- Feature request: Messure distances between points HOT 5
- Diagonal Fences/Walls/Windows and Eidolon Incompatibilities HOT 1
- BlueMap webserver immediately closes client connection when bound to 127.0.0.1 HOT 4
- [4.1] `BlueMap-Plugin-UpdateCommand failed main thread check: world save` exception after `bluemap update world` console command HOT 2
- Changes to the web files don't work HOT 1
- Firefox Flickering issue HOT 8
- Error reading world data with compactmachines mod on startup in 4.0+ HOT 2
- Framed blocks not showing up correctly on bluemap HOT 1
- Webserver: SQL port configuration is not used
- async update does not work HOT 2
- Lowres heightmaps not working below y0?
- Rails from the Create mod & addon that are not straight and flat don't show up on BlueMap HOT 3
- Bells arent displayed correctly HOT 2
- error when having a huge map HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bluemap.