web-server-chrome icon indicating copy to clipboard operation
web-server-chrome copied to clipboard

A great alternative for Windows

Open photopea opened this issue 6 years ago • 1 comments

Hi guys, this server was extremely slow for me in the latest chrome. I had to restart it all the time. Finally, I found an alternative, that is about 10x faster and uses much less RAM.

Your URLs will remain the same. Here is what to do:

  • download NGIX from http://nginx.org/en/download.html
  • unzip, open the conf/nginx.conf and replace its content with following:
worker_processes  1;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    server {
        listen       8887;
        server_name  http://127.0.0.1;
        location / {
            root   C:/Desktop/.....;
        }
    }
}
  • replace the C:/Desktop/..... with the directory, that should be accessible by the server
  • double-click the nginx.exe to start it. It will run in a background, using 1 MB of RAM

photopea avatar Nov 20 '18 16:11 photopea

Another good alternative is Python's HTTP Server. Just use the below commands then visit http://localhost:8000 in your browser of choice.

Linux:

cd path-to-dir-to-serve
python3 -m http.server

Windows

cd path-to-dir-to-serve
REM If you use the Windows Python Launcher:
py -3 -m http.server
REM If you don't use the Windows Python Launcher and you have Python 3.X in %PATH%:
python -m http.server

xchellx avatar Sep 08 '20 08:09 xchellx