Uberspace / manual

This manual documents how to use the basic features of Uberspace 7.
https://manual.uberspace.de/
Other
51 stars 108 forks source link

Add "verify that the server is accessible" section #537

Closed janek closed 6 months ago

janek commented 6 months ago

Motivation: I was trying to set up flask and thought I had it correctly. Then I wanted to check if it works and did curl <IP> as well as curl <myusername>.uber.space and in both cases I did not get a response from my application, but instead default html (see below). I needed to add -I to curl to get HTTP 200. The lab guide I was using did not mention it, but I looked up the django guide based on GH issues saying it's similar and I found that tip there (https://lab.uberspace.de/guide_django/?highlight=django#finishing-installation). I was thinking about adding it to the Flask guide but I realized 'web backends' might be better.


Having written this, I realized the HTTP 200 may be still coming from the "default" html and not my application. I'm nevertheless leaving this PR, maybe you can verify and decide what's best to write in the section!

SalocinHB commented 6 months ago

Unfortunately, what exactly counts as “working” depends on the individual application. An HTTP status code of 200 only means that the web server had some content to serve you, it doesn't mean it's the content you wanted it to serve.

janek commented 6 months ago

But it would mean that the server is running and accessible, right? That's what I meant here and that's what's in the change posted in the PR. The PR title said "verify that it works" but I renamed it now to be clearer.