Skip to content

Commit

Permalink
Update detailed-webserver-instructions.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pjvandehaar authored Sep 25, 2023
1 parent 1ecace2 commit 60322bf
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions etc/detailed-webserver-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,25 @@

Run `pheweb serve --open`. That command should either open a browser to your new PheWeb, or it should give you a URL that you can open in your browser to access your new PheWeb. If it doesn't, follow the directions for [hosting a PheWeb and accessing it from your browser](etc/detailed-webserver-instructions.md).

- If port 5000 is already taken, choose a different port (for example, 5432) and run `pheweb serve --port 5432` instead.
- If port 5000 is already taken, run `pheweb serve --open --port=5001` instead, or choose some other port.

- If the server works but you can't open it in a web browser, you have two options:

1. Option 1: Run PheWeb on the open internet.

You need a port that can get through your firewall. 80 or 5000 probably work.
You need a port that can get through your firewall. 80 or 443 probably work.

- To use port 80 you'll need root permissions, so run something like `sudo $(which python3) $(which pheweb) serve --port 80`.
To use port 80 or 443 you'll need root permissions. Run `sudo $(which python3) $(which pheweb) serve --open --port=80`.
Then open the URLs that they suggest.

Then run `pheweb serve --guess-address` and open the two URLs it provides.

2. Option 2: Run PheWeb with the default settings, then use an SSH tunnel to connect to it from your computer.
3. Option 2: Run PheWeb with the default settings, then use an SSH tunnel to connect to it from your computer.

For example, if you normally ssh with `ssh [email protected]`, then the command you should run (on the computer you're sitting at) is `ssh -N -L localhost:5000:localhost:5000 [email protected]`.

Then open <http://localhost:5000> in your web browser. It should connect straight to port 5000 on the server through your ssh tunnel, allowing you to access your site.

Sometimes MacOS itself uses port 5000, so you might need to use a different port.



## Using Apache2 or Nginx
Expand Down

0 comments on commit 60322bf

Please sign in to comment.