Project

General

Profile

[Solved] Alternate document-root doesn't work

Added by wrkilu about 8 years ago

Hi,

Centos7, lighttpd-1.4.39-1.el7.x86_64.

Config:

server.document-root = "/opt/www" 
#server.document-root = "/var/www/lighttpd" 
server.port = 80
server.bind = "10.192.4.1" 
mimetype.assign = (
  ".html" => "text/html",
  ".txt" => "text/plain",
  ".jpg" => "image/jpeg",
  ".png" => "image/png" 
)
debug.log-request-header   = "enable" 
debug.log-response-header  = "enable" 
debug.log-request-handling = "enable" 
debug.log-file-not-found   = "enable" 
server.username  = "lighttpd" 
server.groupname = "lighttpd" 

/opt/www has recursive rights 777. Despite that still I have "403 fordidden" when I try to enter to http://10.192.4.1/index.html. When I change document-root to original /var/www/lighttpd - it works right away. What is gooing on ? It drive me nuts already :(

Please help
Robert


Replies (2)

RE: Alternate document-root doesn't work - Added by stbuehler about 8 years ago

Don't ever use 777. Use 0755 if you need world-readable on directories. Also check permissions of the parent directories, the files (0644 for world-readable) and SELinux/AppArmor configurations (if enabled). Running strace -p $(pidof lighttpd) also might help seeing what the problem is.

RE: Alternate document-root doesn't work - Added by wrkilu about 8 years ago

That was Selinux huh! how could I forget about that..

Many thanks man!
Robert

    (1-2/2)