Jump to content

Photo

Lighttpd problems


Best Answer SmartDuck, 30 April 2017 - 08:48 PM

Thanks for the help.

I will go for the sample config and start from there to get the server working.

 

Solved it partly by setting the rights to 755 on the subfolders. The server is not public only for testing purposes.

Go to the full post


  • Please log in to reply
4 replies to this topic

#1 SmartDuck

SmartDuck

    Zenware Developer

  • Developer
  • 81 posts
  • LocationWaalwijk, the Netherlands

Posted 27 April 2017 - 08:14 PM

I don't know if this is an Bodhi issue or ubuntu. But I'm stuck... I'm trying to setup a lighttpd webserver with php and cgi or fastcgi. Tried a lot of things:

- reinstalled all packages lighttpd, php7.0, php7.0-fpm, php7.0-cgi, php7.0-cli, php7.0-gd

- check the rights on the dirs and files

- checked the owner of the files

etc...

Php script are executed only in the root dir, still keeping a 403 error on subfolders, looks like the module is never loaded for lighttpd....  lighttpd-enable-module only gives the message Ignoring unknown module: fastcgi-php

 

My lighttpd.config:

server.port = 80
server.modules = (
        "mod_access",
        "mod_accesslog",
        "mod_fastcgi"
)
server.document-root = "/var/www/html/"
server.errorlog   = "/var/log/lighttpd/error.log"
server.username = "www-data"
server.groupname = "www-data"
server.pid-file = "/var/run/lighttpd.pid"

accesslog.filename = "/var/log/lighttpd/access.log"

## Enable/Disable Directory Listings
dir-listing.encoding = "utf-8"
dir-listing.activate = "enable"
dir-listing.hide-dotfiles = "enable"

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi")

## Enable PHP and Python
fastcgi.server = ( ".php" => ((
	"bin-path" => "/usr/bin/php-cgi",
	"socket" => "/tmp/php.socket"
))) 

index-file.names = ( "index.php", "index.html" )

##  MimeType handling
## -------------------
##
## Use the "Content-Type" extended attribute to obtain mime type if
## possible
##
mimetype.use-xattr        = "disable" 

##
## mimetype mapping
##
mimetype.assign             = (
  ".pdf"          =>      "application/pdf",
  ".zip"          =>      "application/zip",
  ".mp3"          =>      "audio/mpeg",
  ".gif"          =>      "image/gif",
  ".jpg"          =>      "image/jpeg",
  ".jpeg"         =>      "image/jpeg",
  ".png"          =>      "image/png",
  ".css"          =>      "text/css",
  ".html"         =>      "text/html",
  ".htm"          =>      "text/html",
  ".js"           =>      "text/javascript",
  ".asc"          =>      "text/plain",
  ".c"            =>      "text/plain",
  ".cpp"          =>      "text/plain",
  ".log"          =>      "text/plain",
  ".conf"         =>      "text/plain",
  ".text"         =>      "text/plain",
  ".txt"          =>      "text/plain",
  ".dtd"          =>      "text/xml",
  ".xml"          =>      "text/xml",
  ".mpeg"         =>      "video/mpeg",
  ".mpg"          =>      "video/mpeg",
  ".mov"          =>      "video/quicktime",
  ".avi"          =>      "video/x-msvideo",
  ".wmv"          =>      "video/x-ms-wmv",
# make the default mime type application/octet-stream.
  ""              =>      "application/octet-stream",
)


Running...

Bodhi 4.2.0 64bit on a Lenovo 110s

Bodhi 4.1.0 Legacy on a Dell Latitude D505
Damn Small 4.4.10 on an old Compaq Armada 1590DT (48MB memory and 3GB harddisk and still usable for administration tasks)
A couple of Raspberry Pi 's,

Arduino' s

and MSX 1 and 2 computers




A big thank you to everyone who contributes to Bodhi Linux


#2 DOOMguy

DOOMguy

    Member

  • Members
  • 167 posts

Posted 28 April 2017 - 05:30 PM

IMNSHO it is not a distro problem, and I would work with the lighttpd devs, or get on their forums, if not their IRC channel.  Two possible leads here and here, The latter has been written by the fine folks at Arch. You might be able to fix that 403 Error (I'd omit the last comma after "octet-stream" but I doubt that that is the showstopper). Pay close attention to the arch wiki and some warnings that make more sense to folks well-versed in Python or httpd/web server setup; I am neither. Good luck.

 

An alternate approach would be to use the sample configuration provided in the first link, then start tweaking it to suit your specific project. Have one of us here access your website to see if it is operational and functional.


Unsolicited advice for learning linux, that won't cost you anything


#3 birdmun

birdmun

    Member

  • Members
  • 352 posts
  • LocationWabash, IN

Posted 29 April 2017 - 02:41 AM

Have one of us here access your website to see if it is operational and functional.

Realistically, he could access the site from a phone, tablet, or computer connected via the cellular network, if he needed an external connection test.



#4 SmartDuck

SmartDuck

    Zenware Developer

  • Developer
  • 81 posts
  • LocationWaalwijk, the Netherlands

Posted 29 April 2017 - 11:30 AM

Thanks for the help.

I will go for the sample config and start from there to get the server working.


Running...

Bodhi 4.2.0 64bit on a Lenovo 110s

Bodhi 4.1.0 Legacy on a Dell Latitude D505
Damn Small 4.4.10 on an old Compaq Armada 1590DT (48MB memory and 3GB harddisk and still usable for administration tasks)
A couple of Raspberry Pi 's,

Arduino' s

and MSX 1 and 2 computers


#5 SmartDuck

SmartDuck

    Zenware Developer

  • Developer
  • 81 posts
  • LocationWaalwijk, the Netherlands

Posted 30 April 2017 - 08:48 PM   Best Answer

Thanks for the help.

I will go for the sample config and start from there to get the server working.

 

Solved it partly by setting the rights to 755 on the subfolders. The server is not public only for testing purposes.


Running...

Bodhi 4.2.0 64bit on a Lenovo 110s

Bodhi 4.1.0 Legacy on a Dell Latitude D505
Damn Small 4.4.10 on an old Compaq Armada 1590DT (48MB memory and 3GB harddisk and still usable for administration tasks)
A couple of Raspberry Pi 's,

Arduino' s

and MSX 1 and 2 computers





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users