lwsjs / local-web-server

A lean, modular web server for rapid full-stack development.
MIT License
1.21k stars 85 forks source link

index.php is downloading itself #13

Closed trappedinspacetime closed 10 years ago

trappedinspacetime commented 10 years ago

Hi,

First of all thank you for making such a handy project. I was looking for such a static local web server, it works well. But it keeps downloading .php file as if it's not in server root. I am on Ubuntu 14.04 platform. What should I do to let server open .php files in browser?

Regards

Kenn

75lb commented 10 years ago

hi @kensully, do you mean you want to see the content of the php file in your browser (i.e. the code), or do you want to see rendered php output in your browser?

trappedinspacetime commented 10 years ago

Hi; No, I don't want to see content of php file (not codes) in static web server. I want it open php files. A php file that is not in my localhost is downloading itself. I wonder if it's a design issue in ws

75lb commented 10 years ago

it's because, by default, connect serves .php files with a Content-type of application/octet-stream - the browser assumes a file with this MIME type should be saved.. i'm working on a solution to allow this to be overridden.

75lb commented 10 years ago

fixed in 0.5.14.. see here.. let me know if you have any questions

75lb commented 10 years ago

local-web-server only serves static files, it does not dynamically render PHP scripts..