LINUX.ORG.RU

lighttpd блокирует порт


0

1

В конфиге лайти прописано «server.port = 82», не взирая на это он пытается забиндить за собой 80-й порт. Логи:

 root@chimera:~# sudo /etc/init.d/webfs start
  Starting httpd daemon: webfsd.
 root@chimera:~# sudo /etc/init.d/lighttpd start
  Starting web server: lighttpd2011-02-16 07:38:37: (network.c.358) can't bind to port: :: 80 Address already in use 

Конфиг:

server.port = 82
 server.modules = (
     "mod_access",
     "mod_alias",
     "mod_compress",
           "mod_redirect",
        "mod_fastcgi",
    "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" 
 dir-listing.activate    = "enable" 
 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" 
 fastcgi.server = (
         ".php" => (
                 "localhost" => (
                         "socket" => "/tmp/php-fastcgi.socket",
                         "bin-path" => "/usr/bin/php-cgi" 
                 )
         )
 )  
 $HTTP["host"] == "194.143.145.241" {
   server.document-root = "/var/www/habari" 
   dir-listing.activate = "disable" 
   url.rewrite-once = (
     "^/(?!scripts/|3rdparty/|system/|doc/|user/(?:themes/|files/|plugins/|locales/|sites/))[^?]*(\?(.*))?" =>   "/index.php/$1"   
   )
 }
 $HTTP["host"] == "192.168.1.150" {
   server.document-root = "/var/www/habari" 
   dir-listing.activate = "disable" 
   url.rewrite-once = (
     "^/(?!scripts/|3rdparty/|system/|doc/|user/(?:themes/|files/|plugins/|locales/|sites/))[^?]*(\?(.*))?" =>   "/index.php/$1" 
   )
 }

Там по ipv6 биндит перловый скрипт, которому наплевать на твои port = 82. или меняй порт в перловом скрипте, или отключай ipv6

uuu
()

include_shell «/usr/share/lighttpd/use-ipv6.pl»

сделай cat /usr/share/lighttpd/use-ipv6.pl и удивись :)

uuu
()
Ответ на: комментарий от ZZaiatSS

> Спасибо, отключил и все нормально стало

Вот так и живём, 1.4 на костылях, 1.5 отменили, 2.0 из транка вообще неюзабельный, а альтернативы нет :(

uuu
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.