Project

General

Profile

[Solved] When i go to localhost, its downloading the file instead of displaying it in the browser.

Added by irishfight over 9 years ago

Sorry but im pretty new to this, im a great PHP programmer and HTML/CSS designer, but for the most part, i havent had any experience setting up any servers, and its something im loving to learn. I got the server up and running and it was working fine, until i reset my computer. I turned Lighttp back on using:

sudo /etc/init.d/lighttpd start

And i currently get this:

sudo /etc/init.d/lighttpd status
 * lighttpd is running

The file that im trying to display is just a .html file with some linked images and css files (if that matters). Im running the newest version of lighttp (just downloaded it a few days ago), and i have elementaryOS:

Distributor ID:    elementary OS
Description:    elementary OS Freya
Release:    0.3.1
Codename:    freya

Conf file: http://pastebin.com/NkemaFq1
Permissions: -rw-r--r-- 1 root root 1217 Sep 19 21:17 /etc/lighttpd/lighttpd.conf


Replies (1)

RE: When i go to localhost, its downloading the file instead of displaying it in the browser. - Added by gstrauss about 8 years ago

Make sure that mimetype.assign is configured with the file extensions you are serving.
Check the Content-Type response header returned by lighttpd (should be a Web Developer tool in the Tools menu your browser, or some similar menu option)

    (1-1/1)