A Simple webserver on your Mac to access your files remotely from Windows

Open a terminal window and run following commands :

$ cd /Documents/yourSharedFiles
$ python -m SimpleHTTPServer 8080
Serving HTTP on 0.0.0.0 port 8000 ...

That's it!!! Your web server is started. 

On the browser, type following address to access your files remotely.

http://localhost:8080

The contents of your current directory must be shown on the browser now.

Advanced issues & troubleshooting:

8080 is the port number. If you get "socket.error: [Errno 48] Address already in use" , change the port number to another one. (less than 65536)

If you want to make your webserver run in port 80 , launch the command above with sudo and enter your root password :

$ python -m SimpleHTTPServer 80
Password:

Serving HTTP on 0.0.0.0 port 80 ...

in this case the url will be :

http://localhost

Make sure to shut the webserver down when you are done with cmd-c key or just closing the terminal window.



Comments

Popular posts from this blog

Get Remote IP Address In Axis SOAP Server

Connect via SSH without a password from MacOS to Linux with an SSHKEY