| 31 | == apache and mod_proxy == |
| 32 | If you already have a domain for your server and want a nice looking domain like 7dtd.example.com for your internal webserver instead of http://example.com:8082/ you can use apache and mod_proxy. |
| 33 | We will use apache and ubuntu to provide an example but any other web server or os may be used in a similar way. We will use "example.com" as our domain, please replace it with your own domain or IP address. |
| 34 | |
| 35 | Install apache2 (we assume you are logged in as root during this example) using either [https://help.ubuntu.com/14.04/serverguide/httpd.html the official documentation] or any other tutorial you find on the net. Basically just run |
| 36 | |
| 37 | {{{ |
| 38 | apt-get install apache2 |
| 39 | a2enmod proxy |
| 40 | a2enmod proxy_http |
| 41 | service apache2 restart |
| 42 | }}} |
| 43 | |
| 44 | create a new config |
| 45 | {{{ |
| 46 | nano /etc/apache2/sites-availible/7dtd.example.com.conf |
| 47 | }}} |
| 48 | |
| 49 | and paste the following into it (assuming the ControlPanelPort is 8080) |
| 50 | {{{ |
| 51 | <VirtualHost *:80> |
| 52 | ServerName 7dtd.example.com |
| 53 | ServerAdmin webmaster@example.com |
| 54 | |
| 55 | ProxyPass / http://localhost:8082/ |
| 56 | ProxyPassReverse / http://localhost:8082/ |
| 57 | |
| 58 | ErrorLog ${APACHE_LOG_DIR}/7dtd.example.com.error.log |
| 59 | LogLevel warn |
| 60 | CustomLog ${APACHE_LOG_DIR}/7dtd.example.com.access.log combined |
| 61 | </VirtualHost> |
| 62 | }}} |
| 63 | |
| 64 | now active the new config and restart apache |
| 65 | {{{ |
| 66 | a2ensite 7dtd.example.com.conf |
| 67 | service apache2 restart |
| 68 | }}} |
| 69 | |
| 70 | You should now be able to visit 7dtd.example.com and see the map. |
| 71 | |
| 72 | '''Please note that this is _not_ a secure way to hide the ControlPanelPort from your users! Port scanning is always an option! |
| 73 | |
| 74 | |