Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001012 [SysCP] Cron Other crash always 2008-11-30 19:36 2008-11-30 22:32
Reporter monotek View Status public  
Assigned To EleRas
Priority high Resolution fixed  
Status closed   Product Version 1.4
Summary 0001012: lighttpd - reload fails when customer trys to redirect a domain
Description If a customers tries to redirect from his domain to another (for example via inserting "http:/www.google.de/" in "Path or URL:") lighttpd fails to reload.

Error Message:

[code]
* Stopping web server lighttpd [ OK ]
 * Starting web server lighttpd 2008-11-14 23:31:33: (configfile.c.855) source: /etc/lighttpd/conf-enabled/10_syscp_ipandport_192.168.123.22.80.conf line: 9 pos: 18 parser failed somehow near here: )
2008-11-14 23:31:33: (configfile.c.855) source: /usr/share/lighttpd/include-conf-enabled.pl line: 2 pos: 8 parser failed somehow near here: (EOL)
2008-11-14 23:31:33: (configfile.c.855) source: /etc/lighttpd/lighttpd.conf line: 62 pos: 60 parser failed somehow near here: /usr/share/lighttpd/include-conf-enabled.pl
                                                                                                                                                                                              [fail]
[/code]


This is my " /etc/lighttpd/conf-enabled/10_syscp_ipandport_192.168.123.22.80.conf":

[code]
# 10_syscp_ipandport_192.168.123.22.80.conf
# Created 14.11.2008 23:31
# Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.

$SERVER["socket"] == "192.168.123.22:80" {
$HTTP["host"] =~ "(^(www\.|)monotek\.ath\.cx$|^(www.)?web2\.server5\.ath\.cx)" {
  server.document-root = "/var/customers/webs/web2/http:/www.google.de/"
  )
  server.errorlog = "/var/customers/logs/web2-error.log"
  LogType = "clf"
  accesslog.filename = "/var/customers/logs/web2-access.log"
}
$HTTP["host"] =~ "^(www\.|)web1\.server5\.ath\.cx$" {
  server.document-root = "/var/customers/webs/web1/"
  auth.backend = "htpasswd"
  auth.backend.htpasswd.userfile = "/etc/lighttpd/syscp-htpasswd//3-735d9ba174d82d7bea0ffdfb1551a030.htpasswd"
  auth.require = (
    "/webalizer/" =>
    (
       "method" => "basic",
       "realm" => "Restricted Area",
       "require" => "user=web1"
    )
  )
  server.errorlog = "/var/customers/logs/web1-error.log"
  LogType = "clf"
  accesslog.filename = "/var/customers/logs/web1-access.log"
}
$HTTP["host"] =~ "^(www\.|)web2\.server5\.ath\.cx$" {
  server.document-root = "/var/customers/webs/web2/"
  auth.backend = "htpasswd"
  auth.backend.htpasswd.userfile = "/etc/lighttpd/syscp-htpasswd//4-20b82c5e12624eb13279501549800bfa.htpasswd"
  auth.require = (
    "/webalizer/" =>
    (
       "method" => "basic",
       "realm" => "Restricted Area",
       "require" => "user=web2"
    )
  )
  server.errorlog = "/var/customers/logs/web2-error.log"
  LogType = "clf"
  accesslog.filename = "/var/customers/logs/web2-access.log"
}

}
[/code]
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0000007)
EleRas (reporter)
2008-11-30 19:43

Long time solved, please review your tickets before copying them!
(0000008)
monotek (reporter)
2008-11-30 19:45

Tryed it yesterday, after https://mantis.syscp.org/view.php?id=706 [^] was solved.

It was not fixed. Did i missed some changes?
(0000012)
monotek (reporter)
2008-11-30 19:55

Current Error and configs of 1.4:

Error Message:

[code]
2008-11-30 19:54:14: (configfile.c.855) source: /etc/lighttpd/conf-enabled/10_syscp_ipandport_192.168.123.22.80.conf line: 33 pos: 21 parser failed somehow near here: )
2008-11-30 19:54:14: (configfile.c.855) source: /usr/share/lighttpd/include-conf-enabled.pl line: 2 pos: 8 parser failed somehow near here: (EOL)
2008-11-30 19:54:14: (configfile.c.855) source: /etc/lighttpd/lighttpd.conf line: 63 pos: 60 parser failed somehow near here: /usr/share/lighttpd/include-conf-enabled.pl
[/code]

Config:

[code]
# 10_syscp_ipandport_192.168.123.22.80.conf
# Created 30.11.2008 19:54
# Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.

$SERVER["socket"] == "192.168.123.22:80" {
$HTTP["host"] =~ "^(www\.|)monotek\.ath\.cx$" {
  server.document-root = "/var/customers/webs/web1/"
  auth.backend = "htpasswd"
  auth.backend.htpasswd.userfile = "/etc/lighttpd/syscp-htpasswd/1-735d9ba174d82d7bea0ffdfb1551a030.htpasswd"
  auth.require = (
    "/webalizer/" =>
    (
       "method" => "basic",
       "realm" => "Restricted Area",
       "require" => "user=web1"
    )
  ,
    "/protect/" =>
    (
       "method" => "basic",
       "realm" => "Restricted Area",
       "require" => "user=test"
    )
  )
$HTTP["url"] =~ "^/empty($|/)" {
        dir-listing.activate = "enable"
}
  accesslog.filename = "/var/customers/logs/web1-access.log"
}
$HTTP["host"] =~ "^(www\.|)redirect\.monotek\.ath\.cx$" {
  server.document-root = "/http:/www.google.de/"
  )
  accesslog.filename = "/var/customers/logs/web1-access.log"
}
$HTTP["host"] =~ "^(www\.|)web1\.server5\.ath\.cx$" {
  server.document-root = "/var/customers/webs/web1/"
  auth.backend = "htpasswd"
  auth.backend.htpasswd.userfile = "/etc/lighttpd/syscp-htpasswd/1-735d9ba174d82d7bea0ffdfb1551a030.htpasswd"
  auth.require = (
    "/webalizer/" =>
    (
       "method" => "basic",
       "realm" => "Restricted Area",
       "require" => "user=web1"
    )
  ,
    "/protect/" =>
    (
       "method" => "basic",
       "realm" => "Restricted Area",
       "require" => "user=test"
    )
  )
$HTTP["url"] =~ "^/empty($|/)" {
        dir-listing.activate = "enable"
}
  accesslog.filename = "/var/customers/logs/web1-access.log"
}
$HTTP["host"] =~ "^(www\.|)web2\.server5\.ath\.cx$" {
  server.document-root = "/var/customers/webs/web2/"
  auth.backend = "htpasswd"
  auth.backend.htpasswd.userfile = "/etc/lighttpd/syscp-htpasswd/2-20b82c5e12624eb13279501549800bfa.htpasswd"
  auth.require = (
    "/webalizer/" =>
    (
       "method" => "basic",
       "realm" => "Restricted Area",
       "require" => "user=web2"
    )
  )
  accesslog.filename = "/var/customers/logs/web2-access.log"
}
$HTTP["host"] =~ "^(www\.|)web3\.server5\.ath\.cx$" {
  server.document-root = "/var/customers/webs/web3/"
  auth.backend = "htpasswd"
  auth.backend.htpasswd.userfile = "/etc/lighttpd/syscp-htpasswd/3-ee3b89013d44a0e02dc90ca26099f101.htpasswd"
  auth.require = (
    "/webalizer/" =>
    (
       "method" => "basic",
       "realm" => "Restricted Area",
       "require" => "user=web3"
    )
  )
  accesslog.filename = "/var/customers/logs/web3-access.log"
}

}
[/code]
(0000013)
monotek (reporter)
2008-11-30 20:00
edited on: 2008-11-30 20:12

To prevent that the httpd server is not working and all sites are shut down new lighttpd conf could be checked before using it.

Could be done with:

"lighttpd -t -f /etc/lighttpd/10_syscp_ipandport_192.168.123.22.80.conf"

If config is not ok the admin should get a mail to open a bug report in syscp.

(0000018)
monotek (reporter)
2008-11-30 20:22

Tested it rigth now. Webserver is running but i just get a 404 when trying to redirect to "http://www.google.de". [^]

This is created config:

[code]
# 10_syscp_ipandport_192.168.123.22.80.conf
# Created 30.11.2008 20:20
# Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.

$SERVER["socket"] == "192.168.123.22:80" {
$HTTP["host"] =~ "^(www\.|)monotek\.ath\.cx$" {
  server.document-root = "/var/customers/webs/web1/"
  auth.backend = "htpasswd"
  auth.backend.htpasswd.userfile = "/etc/lighttpd/syscp-htpasswd/1-735d9ba174d82d7bea0ffdfb1551a030.htpasswd"
  auth.require = (
    "/webalizer/" =>
    (
       "method" => "basic",
       "realm" => "Restricted Area",
       "require" => "user=web1"
    )
  ,
    "/protect/" =>
    (
       "method" => "basic",
       "realm" => "Restricted Area",
       "require" => "user=test"
    )
  )
$HTTP["url"] =~ "^/empty($|/)" {
        dir-listing.activate = "enable"
}
  accesslog.filename = "/var/customers/logs/web1-access.log"
}
$HTTP["host"] =~ "^(www\.|)redirect\.monotek\.ath\.cx$" {
  server.document-root = "/http:/www.google.de/"
  accesslog.filename = "/var/customers/logs/web1-access.log"
}
$HTTP["host"] =~ "^(www\.|)web1\.server5\.ath\.cx$" {
  server.document-root = "/var/customers/webs/web1/"
  auth.backend = "htpasswd"
  auth.backend.htpasswd.userfile = "/etc/lighttpd/syscp-htpasswd/1-735d9ba174d82d7bea0ffdfb1551a030.htpasswd"
  auth.require = (
    "/webalizer/" =>
    (
       "method" => "basic",
       "realm" => "Restricted Area",
       "require" => "user=web1"
    )
  ,
    "/protect/" =>
    (
       "method" => "basic",
       "realm" => "Restricted Area",
       "require" => "user=test"
    )
  )
$HTTP["url"] =~ "^/empty($|/)" {
        dir-listing.activate = "enable"
}
  accesslog.filename = "/var/customers/logs/web1-access.log"
}
$HTTP["host"] =~ "^(www\.|)web2\.server5\.ath\.cx$" {
  server.document-root = "/var/customers/webs/web2/"
  auth.backend = "htpasswd"
  auth.backend.htpasswd.userfile = "/etc/lighttpd/syscp-htpasswd/2-20b82c5e12624eb13279501549800bfa.htpasswd"
  auth.require = (
    "/webalizer/" =>
    (
       "method" => "basic",
       "realm" => "Restricted Area",
       "require" => "user=web2"
    )
  )
  accesslog.filename = "/var/customers/logs/web2-access.log"
}
$HTTP["host"] =~ "^(www\.|)web3\.server5\.ath\.cx$" {
  server.document-root = "/var/customers/webs/web3/"
  auth.backend = "htpasswd"
  auth.backend.htpasswd.userfile = "/etc/lighttpd/syscp-htpasswd/3-ee3b89013d44a0e02dc90ca26099f101.htpasswd"
  auth.require = (
    "/webalizer/" =>
    (
       "method" => "basic",
       "realm" => "Restricted Area",
       "require" => "user=web3"
    )
  )
  accesslog.filename = "/var/customers/logs/web3-access.log"
}

}
[/code]
(0000024)
monotek (reporter)
2008-11-30 21:04

Still have an error:

[code]
2008-11-30 21:01:58: (configfile.c.796) source: /etc/lighttpd/conf-enabled/10_syscp_ipandport_192.168.123.22.80.conf line: 31 pos: 54 invalid character in variable name
[/code]

Conf (redirection was to "http://www.google.com") [^] :

[code]
# 10_syscp_ipandport_192.168.123.22.80.conf
# Created 30.11.2008 20:55
# Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.

$SERVER["socket"] == "192.168.123.22:80" {
$HTTP["host"] =~ "^(www\.|)monotek\.ath\.cx$" {
  server.document-root = "/var/customers/webs/web1/"
  auth.backend = "htpasswd"
  auth.backend.htpasswd.userfile = "/etc/lighttpd/syscp-htpasswd/1-735d9ba174d82d7bea0ffdfb1551a030.htpasswd"
  auth.require = (
    "/webalizer/" =>
    (
       "method" => "basic",
       "realm" => "Restricted Area",
       "require" => "user=web1"
    )
  ,
    "/protect/" =>
    (
       "method" => "basic",
       "realm" => "Restricted Area",
       "require" => "user=test"
    )
  )
$HTTP["url"] =~ "^/empty($|/)" {
        dir-listing.activate = "enable"
}
  accesslog.filename = "/var/customers/logs/web1-access.log"
}
$HTTP["host"] =~ "^(www\.|)redirect\.monotek\.ath\.cx$" {
  url.redirect = ( "^/(.*)" => "redirect.monotek.ath.cx"/$1" )
  accesslog.filename = "/var/customers/logs/web1-access.log"
}
$HTTP["host"] =~ "^(www\.|)web1\.server5\.ath\.cx$" {
  server.document-root = "/var/customers/webs/web1/"
  auth.backend = "htpasswd"
  auth.backend.htpasswd.userfile = "/etc/lighttpd/syscp-htpasswd/1-735d9ba174d82d7bea0ffdfb1551a030.htpasswd"
  auth.require = (
    "/webalizer/" =>
    (
       "method" => "basic",
       "realm" => "Restricted Area",
       "require" => "user=web1"
    )
  ,
    "/protect/" =>
    (
       "method" => "basic",
       "realm" => "Restricted Area",
       "require" => "user=test"
    )
  )
$HTTP["url"] =~ "^/empty($|/)" {
        dir-listing.activate = "enable"
}
  accesslog.filename = "/var/customers/logs/web1-access.log"
}
$HTTP["host"] =~ "^(www\.|)web2\.server5\.ath\.cx$" {
  server.document-root = "/var/customers/webs/web2/"
  auth.backend = "htpasswd"
  auth.backend.htpasswd.userfile = "/etc/lighttpd/syscp-htpasswd/2-20b82c5e12624eb13279501549800bfa.htpasswd"
  auth.require = (
    "/webalizer/" =>
    (
       "method" => "basic",
       "realm" => "Restricted Area",
       "require" => "user=web2"
    )
  )
  accesslog.filename = "/var/customers/logs/web2-access.log"
}
$HTTP["host"] =~ "^(www\.|)web3\.server5\.ath\.cx$" {
  server.document-root = "/var/customers/webs/web3/"
  auth.backend = "htpasswd"
  auth.backend.htpasswd.userfile = "/etc/lighttpd/syscp-htpasswd/3-ee3b89013d44a0e02dc90ca26099f101.htpasswd"
  auth.require = (
    "/webalizer/" =>
    (
       "method" => "basic",
       "realm" => "Restricted Area",
       "require" => "user=web3"
    )
  )
  accesslog.filename = "/var/customers/logs/web3-access.log"
}

}
[/code]
(0000026)
monotek (reporter)
2008-11-30 21:12

Error:

2008-11-30 21:10:53: (configfile.c.796) source: /etc/lighttpd/conf-enabled/10_syscp_ipandport_192.168.123.22.80.conf line: 31 pos: 51 invalid character in variable name


This is the line:

url.redirect = ( "^/(.*)" => "http://www.google.de"/$1" [^] )
(0000027)
monotek (reporter)
2008-11-30 21:23

Works now :-)
(0000038)
EleRas (reporter)
2008-11-30 22:32

Version released

-  SVN - commits
(#2463)
EleRas
2008-11-30 19:52
* Going to fix lighty - redirects, refs #1012
A branches/eleras/lightyRedirectFix/
(#2465)
EleRas
2008-11-30 20:11
* This should fix redirects with lighttpd, refs #1012
U branches/eleras/lightyRedirectFix/scripts/cron_tasks.inc.http.20.lighttpd.php
(#2466)
EleRas
2008-11-30 20:41
Fixing the breakage the update 1.2.19-svn42 to 1.2.19-svn43 broke with redirect-URLs in the database, partly refs #1012
U branches/eleras/lightyRedirectFix/install/updatesql.php
U branches/eleras/lightyRedirectFix/scripts/cron_tasks.inc.http.20.lighttpd.php
(#2467)
EleRas
2008-11-30 20:44
Argh, forgot to add the new updater-file, sry, still partly refs #1012
A branches/eleras/lightyRedirectFix/install/updatesql_1.4.inc.php
(#2468)
EleRas
2008-11-30 20:48
Now let's try the updater-fix, refs #1012
U branches/eleras/lightyRedirectFix/install/syscp.sql
U branches/eleras/lightyRedirectFix/lib/tables.inc.php
(#2469)
EleRas
2008-11-30 20:54
Fixing the searchpattern for the updater-fix, refs #1012
U branches/eleras/lightyRedirectFix/install/updatesql_1.4.inc.php
(#2470)
EleRas
2008-11-30 21:04
* Semi-reverting the redirect - patch, let's see if this works, refs #1012
U branches/eleras/lightyRedirectFix/scripts/cron_tasks.inc.http.20.lighttpd.php
(#2471)
EleRas
2008-11-30 21:11
The " was too much, now the redirects should work I think, refs #1012
U branches/eleras/lightyRedirectFix/scripts/cron_tasks.inc.http.20.lighttpd.php
(#2472)
EleRas
2008-11-30 21:14
And now the additional ) (appeard if no auth was set), isn't written anymore, #refs #1012
U branches/eleras/lightyRedirectFix/scripts/cron_tasks.inc.http.20.lighttpd.php
(#2473)
EleRas
2008-11-30 21:39
* Using makeCorrectDir instead of makeSecurePath now, refs #1012
* Fixing the old updater, you now, just in case ;), refs #1022
U branches/eleras/lightyRedirectFix/install/updatesql_1.2.19-20.inc.php
U branches/eleras/lightyRedirectFix/scripts/cron_tasks.inc.http.20.lighttpd.php
(#2474)
EleRas
2008-11-30 21:44
* Fixing lighty - redirects, fixes #1012
* Fixing old double-slashes fix, which lead to broken Redirect-URLs in the database, fixes #1022
_U trunk/syscp/
U trunk/syscp/install/syscp.sql
U trunk/syscp/install/updatesql.php
U trunk/syscp/install/updatesql_1.2.19-20.inc.php
A trunk/syscp/install/updatesql_1.4.inc.php
U trunk/syscp/lib/tables.inc.php
U trunk/syscp/scripts/cron_tasks.inc.http.20.lighttpd.php

- Issue History
Date Modified Username Field Change
2008-11-30 19:36 monotek New Issue
2008-11-30 19:43 EleRas Note Added: 0000007
2008-11-30 19:43 EleRas Status new => resolved
2008-11-30 19:43 EleRas Fixed in Version => 1.4
2008-11-30 19:43 EleRas Resolution open => fixed
2008-11-30 19:43 EleRas Assigned To => EleRas
2008-11-30 19:45 monotek Note Added: 0000008
2008-11-30 19:45 monotek Status resolved => feedback
2008-11-30 19:45 monotek Resolution fixed => reopened
2008-11-30 19:53 svn Checkin
2008-11-30 19:55 monotek Note Added: 0000012
2008-11-30 20:00 monotek Note Added: 0000013
2008-11-30 20:01 monotek Note Edited: 0000013
2008-11-30 20:11 svn Checkin
2008-11-30 20:12 monotek Note Edited: 0000013
2008-11-30 20:22 monotek Note Added: 0000018
2008-11-30 20:22 EleRas Priority normal => high
2008-11-30 20:22 EleRas Severity block => crash
2008-11-30 20:22 EleRas Status feedback => assigned
2008-11-30 20:22 EleRas Projection none => minor fix
2008-11-30 20:22 EleRas ETA none => < 1 day
2008-11-30 20:22 EleRas Fixed in Version 1.4 =>
2008-11-30 20:22 EleRas Target Version => 1.4.1
2008-11-30 20:41 svn Checkin
2008-11-30 20:48 svn Checkin
2008-11-30 20:48 svn Checkin
2008-11-30 20:54 svn Checkin
2008-11-30 21:04 monotek Note Added: 0000024
2008-11-30 21:05 svn Checkin
2008-11-30 21:12 monotek Note Added: 0000026
2008-11-30 21:23 monotek Note Added: 0000027
2008-11-30 21:32 svn Checkin
2008-11-30 21:32 svn Checkin
2008-11-30 21:39 svn Checkin
2008-11-30 21:44 svn Checkin
2008-11-30 21:44 svn Status assigned => resolved
2008-11-30 21:44 svn Resolution reopened => fixed
2008-11-30 22:28 EleRas Fixed in Version => 1.4.1
2008-11-30 22:32 EleRas Note Added: 0000038
2008-11-30 22:32 EleRas Status resolved => closed
Footer