lighttpd and php 403 – Forbidden

I’m trying to upload a xml file using lighttpd and php into linux board.

Unfortenly, I get a 403 – Forbidden error.

No errors into error.log.

No fcgi.

web_root folder has

chown -R root:root /web_root

Ajax request

$.ajax({
    url: "/cid/filename.cid",
    method: "PUT",
    data: xmlCID,
    dataType: "xml",
    processData: false,
    success: function(data){
        console.log(data);
    },
    error: function(jqXHR, textStatus, errorThrown){
       alert(jqXHR.responseText, textStatus, errorThrown);
    }
});

lighttpd conf

server.modules              = (
                               "mod_rewrite",
                                "mod_access",
                               "mod_auth",
                               "mod_cgi",
                                "mod_accesslog" )

server.document-root        = "/home/web_root/"
server.errorlog             = "/home/lighttpd.error.log"

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

server.event-handler = "poll" # needed on OS X

server.tag                 = "lighttpd/1.4.11 (Win32)"

accesslog.filename          = "/home/access.log"

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

server.upload-dirs = ( "/var/tmp/lighttpd-upload/" )


Source: linux

Leave a Reply