mirror of https://github.com/webbukkit/dynmap.git
updated apache2 guide
parent
5a5f211014
commit
97fcd72573
|
@ -1,41 +1,33 @@
|
|||
This page assumes:
|
||||
|
||||
* You have apache2 installed.
|
||||
* Your www-root directory to be: `/srv/http/`.
|
||||
* You could access your Dynmap-map succesfully through *http://localhost:8123/*.
|
||||
* Your www-root directory to be: `/var/www/html/`.
|
||||
* You could access your Dynmap-map succesfully through *http://localhost:8123* or *http://local-network-ip:8123*.
|
||||
|
||||
This example shows how to put dynmap on your apache2 webserver in *http://mywebserver/dynmap/*.
|
||||
This example shows how to put dynmap on your apache2 webserver in *http://mywebserverdomain.ext/* or https://mywebserverdomain.ext.
|
||||
|
||||
* To start, create the directory `/srv/http/dynmap/`.
|
||||
* To start, navigate to the directory `/srv/http/dynmap/`.
|
||||
* Copy the contents of the `web` directory found in the zip to `/srv/http/dynmap/`.
|
||||
|
||||
First, we need to enable the modules we need. Type in bash:
|
||||
```bash
|
||||
This guide will make your dynmap work using http or https.
|
||||
|
||||
To start, navigate to directory /var/www/.
|
||||
|
||||
Now, we need to enable the modules we need. Type in bash:
|
||||
|
||||
sudo a2enmod rewrite proxy_http
|
||||
```
|
||||
|
||||
Next, we must 'redirect' `/dynmap/up/` and `/dynmap/standalone/` to dynmap's internal webserver. To do this, make sure you have the following at the end of `/etc/apache2/sites-available/default`:
|
||||
Next, we must reverse proxy to dynmap's internal webserver. To do this, make sure you have the following in /etc/apache2/sites-available/000-default.conf for non SSL use:
|
||||
|
||||
If you are using SSL, default should be your SSL configuration file. Lets Encrypt's file is 000-default-le-ssl.conf.
|
||||
|
||||
```apache
|
||||
...
|
||||
Alias /dynmap/tiles /opt/minecraft_server/plugins/dynmap/web/tiles/
|
||||
|
||||
RewriteEngine on
|
||||
RewriteRule /dynmap/up/(.*) http://localhost:8123/up/$1 [P,L]
|
||||
RewriteRule /dynmap/standalone/(.*) http://localhost:8123/standalone/$1 [P,L]
|
||||
</VirtualHost>
|
||||
|
||||
<Directory /opt/minecraft_server/plugins/dynmap/web/tiles/>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
|
||||
<Proxy http://localhost:8123/*>
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</Proxy>
|
||||
```
|
||||
|
||||
Restart apache2 (`sudo /etc/init.d/apache2 restart`).
|
||||
ProxyRequests off
|
||||
ProxyPass / "http://localhost:8123/"
|
||||
ProxyPassReverse / "http://localhost:8123/"
|
||||
...
|
||||
|
||||
It should now display online players on *http://mywebserver/dynmap/*, keeping them up-to-date.
|
||||
Restart apache2 (sudo systemctl restart apache2).
|
||||
|
||||
You should now be able to access dynmap with http://domainname.com/ or https://domainname.com
|
Loading…
Reference in New Issue