Project

General

Profile

[Solved] lighttpd - cannot access http://localhost

Added by NoreSoft over 9 years ago

Hello everybody,

I couldn't find a solution for my problem so far. In fact I think that I'm stuck somewhere at the beginning and probably do something totally wrong.

I am running "Debian 7.0" and "lighttpd-1.4.31 (ssl)". I installed it by "apt-get install php5-cgi lighttpd". Then I enabled fast-cgi: "lighttpd-enable-mod fastcgi" and edited the /etc/lighttpd/lighttpd.conf as it is said at http://www.the-develop.net/openentry/wiki/doku.php?id=de:coap-linknx . And the last I did was "/etc/init.d/lighttpd restart". In the console I got the message "[ ok ] Stopping web server: lighttpd. [ ok ] Starting web server: lighttpd.". So everything seemed OK by now.

Then I started Midori (Version 0.4.3) and tried to open http://localhost/ as well as http://127.0.0.1/ . The outcome was the same: "Error ... The page '...' couldn't be loaded. Cannot connect to destination (..)".

I don't know what I do wrong. Is there any way to find out, if lighttpd is running well?

Kind Regards,
David


Replies (2)

RE: lighttpd - cannot access http://localhost - Added by NoreSoft over 9 years ago

Hi there,

news from my problem:

I had a look at the /var/log/lighttpd/error.log .

At first I got the following:
2014-11-14 19:22:04: (log.c.166) server started
2014-11-14 19:22:04: (mod_fastcgi.c.1350) port has to be set in: fastcgi.server = ( .php => ( localhost ( ...
2014-11-14 19:22:04: (server.c.976) Configuration of plugins failed. Going down.

So I added the line "port" => 80, to the /etc/lighttpd/lighttpd.conf , restarted lighttpd and had another look at the error.log file. Now I get the following:

2014-11-15 22:57:30: (log.c.166) server started
2014-11-15 22:57:30: (mod_fastcgi.c.977) bind failed for: tcp:localhost:81 Permission denied
2014-11-15 22:57:30: (mod_fastcgi.c.1397) [ERROR]: spawning fcgi failed.
2014-11-15 22:57:30: (server.c.976) Configuration of plugins failed. Going down.

(The date is wrong by the way, because the system time of the Computer is not set properly.)

And I am stuck again. What exactly is tcp:localhost:81 ? A file (like "everything is a file")? Where do I find it and why does lighttpd not have the permission that it needs. What I also don't understand: Why port 81 when I set it to port 80?

I attach my lighttpd.conf file.

Kind Regards
David

RE: lighttpd - cannot access http://localhost - Added by NoreSoft over 9 years ago

Hi again,

I had a typo in the lighttpd.conf . Sorry for that. Now everything works. I had "sockets" instead of "socket" in the configuration of the fastcgi mod.

Kind Regards,
David

    (1-2/2)