0

I following this tutorial corectly : http://howtoforge.com/installing-lighttpd-with-php5-and-mysql-support-on-fedora-14

But now i got this error :

    [root@fedora lighttpd]# /etc/init.d/lighttpd start
Starting lighttpd: 2011-03-24 00:06:03: (configfile.c.907) source: /etc/lighttpd/lighttpd.conf line: 326 pos: 92 parser failed somehow near here: include_shell 
                                                           [FAILED]

How i can fix this? thanks...

Alzea Arafat
  • 1
  • 1
  • 2
  • Since it's something related to the confif file we should read the file content – David Costa Mar 24 '11 at 08:10
  • Please check this out : http://paste.lighttpd.net/1559 – Alzea Arafat Mar 24 '11 at 09:41
  • Lines from 216 to 222 should be uncommented, wipe away the starting pund sign. – David Costa Mar 24 '11 at 09:49
  • Still not working... [root@fedora lighttpd]# /etc/init.d/lighttpd start Starting lighttpd: 2011-03-24 16:55:29: (configfile.c.848) source: find /etc/lighttpd/lighttpd.conf line: 1 pos: 1 invalid character in variable name 2011-03-24 16:55:29: (configfile.c.904) configfile parser failed at: 2011-03-24 16:55:29: (configfile.c.907) source: /etc/lighttpd/lighttpd.conf line: 328 pos: 1 parser failed somehow near here: (EOL) [FAILED] – Alzea Arafat Mar 24 '11 at 09:55
  • change the last line from – David Costa Mar 24 '11 at 10:07
  • change the last line into include "/etc/lighttpd/lighttpd.conf" and repost the conf – David Costa Mar 24 '11 at 10:08
  • still error : [root@fedora lighttpd]# /etc/init.d/lighttpd start Starting lighttpd: 2011-03-24 17:11:28: (configfile.c.953) opening configfile /etc/lighttpd/find /etc/lighttpd/lighttpd.conf failed: No such file or directory 2011-03-24 17:11:28: (configfile.c.907) source: /etc/lighttpd/lighttpd.conf line: 328 pos: 1 parser failed somehow near here: (EOL) | this is my config : http://paste.lighttpd.net/1560 – Alzea Arafat Mar 24 '11 at 10:13
  • Ok. I actually don't know why you (the original conf) should run find on a path... I commented the last line. Try this one: http://paste.lighttpd.net/1561 – David Costa Mar 24 '11 at 10:19
  • Ok... now another error : [root@fedora lighttpd]# /etc/init.d/lighttpd start Starting lighttpd: 2011-03-24 17:24:42: (network.c.345) can't bind to port: 80 Address already in use [FAILED] – Alzea Arafat Mar 24 '11 at 10:25
  • Better. Now the syntax of the config file is correct but the server doesn't start as another process is using the port 80. Maybe are you running an apache instance or maybe you already started lighty :-p Try to visit http://127.0.0.1 and discover what's running – David Costa Mar 24 '11 at 10:36
  • Ok, it's apache... i've never install apache, maybe it's installed by default. How i can disable it, and let lighttpd start when boot? – Alzea Arafat Mar 24 '11 at 10:43
  • It depends on your distribution. In particular for Fedora core the answer is here: http://www.fedorafaq.org/basics/#services – David Costa Mar 24 '11 at 10:49
  • It's working now.. Thanks David Costa, you help me... :) – Alzea Arafat Mar 24 '11 at 11:06

1 Answers1

1

In order to make lighty work, starting from this file: http://paste.lighttpd.net/1559 You have to:

Configuration syntax corrections:

  1. Uncomment the PHP-fastcgi section so that it opens and close the right number of parenthesis.
  2. Comment the last line which doesn't return valid configuration data + it's a nonsense (to me)

Configure the service to start:

  1. On fedora core use its tools to STOP every other service that uses the port 80 tcp (i.e. Apache)
  2. Using these tools configure lighttpd as a service to be run on the default runlevel.

A brief explanation about the fedora core service configuration tools can be found here: http://www.fedorafaq.org/basics/#services

David Costa
  • 628
  • 5
  • 21