Commit 2cbcb0d3 authored by Peter's avatar Peter Committed by ave
Browse files

Apache configuration/instructions for self-host

parent c6523107
<VirtualHost *:80>
ServerName conntest.nintendowifi.net
DocumentRoot /path/to/data/test
# Ensure mod_headers module its loaded or comment the two
# lines below if you don't want to use it.
Header add Content-Type text/html
Header add X-Organization Nintendo
<Directory /path/to/data/test>
# Apache 2.4
Require all granted
# Apache 2.2 - Comment the above line and uncomment
# the lines below in case you're using version 2.2
# Order allow, deny
# Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName ctest.cdn.nintendo.net
DocumentRoot /path/to/data/cdn
# Ensure mod_headers module its loaded or comment the two
# lines below if you don't want to use it.
Header add Content-Type text/plain
Header add X-Organization Nintendo
<Directory /path/to/data/cdn>
# Apache 2.4
Require all granted
# Apache 2.2 - Comment the above line and uncomment
# the lines below in case you're using version 2.2
# Order allow, deny
# Allow from all
</Directory>
</VirtualHost>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>HTML Page</title>
</head>
<body bgcolor="#FFFFFF">This is test.html page</body>
</html>
\ No newline at end of file
......@@ -11,7 +11,7 @@
Only if you chose to not trust me with wifi check bypass:
- Install nginx on a server, start and enable it (example: `apt install nginx`, `systemctl enable --now nginx`)
- Install a web server (nginx or Apache) on a server, start and enable it (example: `apt install nginx`, `systemctl enable --now nginx`)
- Make sure that the port 80 is both open and accessible (you can use `nmap <IP>` on a different machine)
### BIND9
......@@ -34,14 +34,34 @@ This part of guide is only for people who chose to go with dnsmasq. Please do no
- Optional, for people who didn't trust with wifi check bypass: edit lines with `nintendo.net` and `nintendowifi.net`, replace `95.216.149.205` with your own IP (if you intend to make the service accessible outside of your home network use your public IP, if not use your private IP)
- Restart dnsmasq (`# systemctl restart dnsmasq`)
### nginx (only if you chose to not trust me with wifi check bypass)
### Web Server (only if you chose to not trust me with wifi check bypass)
#### nginx
- Download the `nginx/switchwifi` file from the repo to your `/etc/nginx/sites-enabled` folder (on non-debian based OSes you might need to set this folder yourself by messing with `/etc/nginx/nginx.conf`)
- Reload nginx (`# systemctl reload nginx`)
#### Apache
- Download the `Apache/switchwifi.conf` file from the repo to your server.
- Download the `Apache/test` & `Apache/cdn` directories to your server.
- Update the `switchwifi.conf` file, adding the correct path for `DocumentRoot` (update `/path/to/data` with the path where you copied the previous folders) and commenting the lines depending on your Apache version.
- Update the main Apache configuration file (usually on `/etc/apache2/httpd.conf`) including the path to the previous file (example: `Include /path/to/file/switchwifi.conf`) and ensuring the needed modules are loaded (example: `LoadModule headers_module mod_headers.so`)
- Finally restart the Apache (`# systemctl reload apache2`)
### DNS (optional)
[this is the only part that I'm not too sure about, sorry. second step might not be necessary]
- Set `dns90.a3.pm.` to your own domain on all BIND9 zones
- Add an A record to that on your registrar's (or NS provider's) DNS settings, point to your DNS server
\ No newline at end of file
- Add an A record to that on your registrar's (or NS provider's) DNS settings, point to your DNS server
### Test the configuration
For an ideal test environment, use a device with WiFi in order to check your configuration.
- Update your device DNS configuration, adding the IP (or DNS if configured) of the server you're hosting on.
- Ping `example.nintendo.com`, it should answer `127.0.0.1`
- Open a web browser and navigate to `http://conntest.nintendowifi.net`. If you see a screen like [this](https://elixi.re/i/p6zo.png), the DNS is working as expected.
If above tests are successful, the DNS server should be correctly configured.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment