Answer the question
In order to leave comments, you need to log in
Why doesn't the python3 web server function work?
Have a function
function web () {
echo "Enter a path to directory: "
read -e -p "Path to dir: " my_dir
read -p "Enter a port nambet " web_port
echo $my_dir
echo $web_port
cd $mydir && python3 -m http.server $web_port
}
Serving HTTP on 0.0.0.0 port 9632 (http://0.0.0.0:9632/) ...
192.168.1.12 - - [24/Dec/2021 07:17:26] "GET / HTTP/1.1" 200 -
192.168.1.12 - - [24/Dec/2021 07:17:26] code 404, message File not found
192.168.1.12 - - [24/Dec/2021 07:17:26] "GET /favicon.ico HTTP/1.1" 404 -
python3 -m http.server 9632
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question