fest Posted June 4, 2009 Report Share Posted June 4, 2009 (edited) Esmu dumjš nixos (un ne tikai), tāpēc vajag palīdzību kā nokonfigurēt lighttpd serveri, lai domēnam un subdomēnam servē failus no dažādām mapēm un (ja iespējams) lai katrā no gadījumiem darbojas ar dažādu lietotāju privilēģijām. Mēģināju nokonfigurēt šādi: $HTTP["host"] =~ "(^|\.)domain\.(ua|com|ru|pl|co\.uk)$" { server.document-root = "/var/www/production/www" server.errorlog = "/var/www/production/logs/error.log" accesslog.filename = "/var/www/production/logs/access.log" server.username = "productionuser" server.groupname = "lighttpd" server.error-handler-404 = "/fileserver/err.php" } $HTTP["host"] =~ "(^|\.)dev\.domain\.(ua|com|ru|pl|co\.uk)$" { server.document-root = "/var/www/development/www" server.errorlog = "/var/www/development/logs/error.log" accesslog.filename = "/var/www/development/logs/access.log" server.username = "developmentuser" server.groupname = "lighttpd" server.error-handler-404 = "/fileserver/err.php" } developmentuser un productionuser eksistē un faili iekš documentrootiem pieder attiecīgi developmentuser:lighttpd un productionuser:lighttpd Aizkomentējot pirmo pusi viss strādā. Atkomentējot pirmo un aizkomentējot otro direktīvu pusi arī- t.i. atsevišķi abas šīs daļas strādā normāli. Kad ir atkomentētas abas puses- lighttpd piešķiļas normāli, taču neko neservē. Development saita error.log failā : 2009-06-04 03:23:19: (mod_accesslog.c.535) opening access-log failed: Permission denied /var/www/production/logs/access.log 2009-06-04 03:23:19: (server.c.908) Configuration of plugins failed. Going down. Kādam ir nojausma, kā šo lietu varētu atrisināt? Problēma laikam ir tur, ka access.log tiek vērts vaļā rakstīšanai ar ne to useri. Log failos ir tiesības rakstīt arī grupai. Edited June 4, 2009 by fest Quote Link to comment Share on other sites More sharing options...
Gstyle Posted June 4, 2009 Report Share Posted June 4, 2009 1. skaties uz permissions 2. pareizi uztaisi # chmod Quote Link to comment Share on other sites More sharing options...
fest Posted June 4, 2009 Author Report Share Posted June 4, 2009 Gint, izskatās, ka vaina bija tur, ka esmu pieradis darboties ar apachi- jebšu: This is wrong, the server.username/groupname setting is not for usage with vhosts. Lighttpd uses one process and the settings named here are for setting the user/group this one process runs as. It can't change the user per request. Apache can do that, not lighty. http://redmine.lighttpd.net/boards/2/topics/322#message-323 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.