Hola lista
He configurado my vpscon lighttpd y logre correr croogo pero los assets como
los css no son reescritos, les adjunto el archivo de configuraion y el lua
para cake, me parce que es algo que tiene que ver con rewrite, solo
descomente la linea que dice rewrite en este archivo de configuracion, pero
nada
saludos
it is using lighttpd with magnet
server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
"mod_rewrite",
)
server.document-root = "/var/www/"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm",
" index.lighttpd.html" )
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
include_shell "/usr/share/lighttpd/use-ipv6.pl"
dir-listing.encoding = "utf-8"
server.dir-listing = "enable"
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/x-javascript", "text/css",
"text/html", "text/plain" )
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
$HTTP["host"] =~ "csotelo.org" {
server.error-handler-404 = "/index.php"
server.document-root = "/home/csotelo/public_html"
#url.rewrite = (
# "(css|files|img|js)/(.*)" => "/$1/$2"
#)
url.rewrite-once = (
"/(css|files|img|js)/(.*)" => "/$1/$2",
#"^([^\?]*)(\?(.+))?$" => "/index.php?url=$1&$3",
)
magnet.attract-physical-path-to = ( "/etc/lighttpd/cake.lua" )
}
the lua file is
-- pequeña funcion helper
function file_exists(path)
local attr = lighty.stat(path)
if (attr) then
return true
else
return false
end
end
function removePrefix(str, prefix)
return str:sub(1,#prefix+1) == prefix.."/" and str:sub(#prefix+2)
end
-- prefijo sin la barra
local prefix = ''
-- la magia ;)
if (not file_exists(lighty.env["physical.path"])) then
-- fichero aún desaparecido, pasarlo al fastcgi Backend
request_uri = removePrefix(lighty.env["uri.path"], prefix)
if request_uri then
lighty.env["uri.path"] = prefix .. "/index.php"
local uriquery = lighty.env["uri.query"] or ""
lighty.env["uri.query"] = uriquery .. (uriquery ~= "" and "&" or "")
.. "url=" .. request_uri
lighty.env["physical.rel-path"] = lighty.env["uri.path"]
lighty.env["request.orig-uri"] = lighty.env["request.uri"]
lighty.env["physical.path"] = lighty.env["physical.doc-root"] ..
lighty.env["physical.rel-path"]
end
end
-- fallthrough pondrá de nuevo la solucititud en el bucle lighty
-- eso significa que tenemos la manipulación 304 de forma gratuita. ;)
Eaiting your help
--
Carlos Eduardo Sotelo Pinto
GNU Linux Admin | PHP Senior Web Developer
MObil: RPC (Claro)+51, 958194614
http://www.csotelo.org
Skype: csotelop
Yahoo: csotelop
MSN: [email protected]
GTalk: [email protected]
GPG FP:697E FAB8 8E83 1D60 BBFB 2264 9E3D 5761 F855 4F6B
GNULinux RU #379182 || GNULinux RM #277661
--
Carlos Eduardo Sotelo Pinto
GNU Linux Admin | PHP Senior Web Developer
MObil: RPC (Claro)+51, 958194614
http://www.csotelo.org
Skype: csotelop
Yahoo: csotelop
MSN: [email protected]
GTalk: [email protected]
GPG FP:697E FAB8 8E83 1D60 BBFB 2264 9E3D 5761 F855 4F6B
GNULinux RU #379182 || GNULinux RM #277661
--
Has recibido este mensaje porque estás suscrito al grupo "CakePHP-es" de Grupos
de Google.
Para publicar una entrada en este grupo, envía un correo electrónico a
[email protected].
Para anular tu suscripción a este grupo, envía un correo electrónico a
[email protected]
Para tener acceso a más opciones, visita el grupo en
http://groups.google.com/group/cakephp-es?hl=es.