oelna / hsma-html

Kursmaterialien für meinen Kurs Offenes Projekt: HTML aka. "VSTG" an der Hochschule Mannheim
7 stars 0 forks source link

local php server #3

Open oelna opened 4 years ago

oelna commented 4 years ago

Webserver mit PHP

php -S localhost:8000 (startet Server im aktuellen Verzeichnis) php -S 0.0.0.0:8000 -t ~/Sites (startet Server im User-Unterordner "Sites")

Aufruf mit http://localhost:8000/ oder http://0.0.0.0:8000/ localhost ist lokal erreichbar, 0.0.0.0 auch von extern/remote

Der PHP Server unterstützt die Verarbeitung von Serverskripten in der Sprache PHP.

Alternative: Webserver mit Python

python -m SimpleHTTPServer 8000 (Python Version 2.x) python3 -m http.server (Python Version 3.x)

Aufruf mit http://localhost:8000/ Der Python Server unterstützt standardmässig keine Sprachen wie PHP oder Python, sondern hostst nur statische Inhalte wie .html oder .css.

selimhex commented 4 years ago

https://gist.github.com/selimhex/974d7e07f8638eaf17378003efc0da0e mein beitrag:)

oelna commented 2 years ago

https://blog.iconfactory.com/2022/06/worldwideweb-part-2/