Matthew-Hsu / PiPass

Nintendo 3DS Homepass for the Raspberry Pi
149 stars 20 forks source link

IP Address Port Number #35

Closed FamicomGuy closed 9 years ago

FamicomGuy commented 9 years ago

How do you change the port number (80 by default) that PiPass runs on in case I want to install a new utility for my Raspberry Pi that is accessed by entering the Pi's IP into the address bar? Can I do the same for any other utility? (This is to prevent overriding PiPass's pages)

nagledb commented 9 years ago

PiPass just uses the default Apache installation. It's fairly straightforward to have it work on a different port. There are two files you'd have to modify. The first is /etc/apache2/ports.conf. You should see these two lines:

NameVirtualHost *:80
Listen 80

Change 80 to whatever port you want to use. The second file is /etc/apache2/sites-enabled. The first like looks like this:

<VirtualHost *:80>

Change that 80 to match your port as well. Once you've edited both files, run this command to reload the configuration files in apache:

service apache2 reload

You'll probably get the message "Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName". You can ignore that, it's normal. As long as it says "ok" and doesn't give any other error messages, you should be able to connect on the new port.

As long as your other utilities don't use Apache, you should be set. However, if they do use Apache, then you may need to learn a bit more about how to configure Apache so that the services can all coexist within Apache on separate ports.

FamicomGuy commented 9 years ago

I installed another utility that uses Apache, and now I can't access PiPass! It must of overwritten it or something. Does anyone know what to do about this, regardless of what the other utility may be?

EDIT: Never mind, I figured it out. I need to modify those files so that they listen and host (respectively) the proper ports. But I'll let you know when I am successful in this or if I need more help. Otherwise I'll likely just change my port back and stick with PiPass.