Project

General

Profile

Symlink CGI program problem

Added by csyimkor almost 12 years ago

lighttpd/1.4.30 (ssl) on Fedora Core 15,
Linux kernel 3.2.6

I got a problem when I run the symlink CGI programs.
When I run the symlink CGI program, I didn't get any error. But I could not get any result page but white page.
The debug logs are followings;
2012-05-11 04:53:02: (response.c.300) -- splitting Request-URI
2012-05-11 04:53:02: (response.c.301) Request-URI : /cgi-bin/firewall/policy
2012-05-11 04:53:02: (response.c.302) URI-scheme : https
2012-05-11 04:53:02: (response.c.303) URI-authority: localhost:8080
2012-05-11 04:53:02: (response.c.304) URI-path : /cgi-bin/firewall/policy
2012-05-11 04:53:02: (response.c.305) URI-query :
2012-05-11 04:53:02: (response.c.349) -- sanatising URI
2012-05-11 04:53:02: (response.c.350) URI-path : /cgi-bin/firewall/policy
2012-05-11 04:53:02: (mod_access.c.135) -- mod_access_uri_handler called
2012-05-11 04:53:02: (response.c.470) -- before doc_root
2012-05-11 04:53:02: (response.c.471) Doc-Root : /usr/local/shieldone/www
2012-05-11 04:53:02: (response.c.472) Rel-Path : /cgi-bin/firewall/policy
2012-05-11 04:53:02: (response.c.473) Path :
2012-05-11 04:53:02: (response.c.521) -- after doc_root
2012-05-11 04:53:02: (response.c.522) Doc-Root : /usr/local/shieldone/www
2012-05-11 04:53:02: (response.c.523) Rel-Path : /cgi-bin/firewall/policy
2012-05-11 04:53:02: (response.c.524) Path : /usr/local/shieldone/www/cgi-bin/firewall/policy
2012-05-11 04:53:02: (response.c.541) -- logical > physical
2012-05-11 04:53:02: (response.c.542) Doc-Root : /usr/local/shieldone/www
2012-05-11 04:53:02: (response.c.543) Rel-Path : /cgi-bin/firewall/policy
2012-05-11 04:53:02: (response.c.544) Path : /usr/local/shieldone/www/cgi-bin/firewall/policy
2012-05-11 04:53:02: (response.c.561) -
handling physical path
2012-05-11 04:53:02: (response.c.562) Path : /usr/local/shieldone/www/cgi-bin/firewall/policy
2012-05-11 04:53:02: (response.c.569) -- file found
2012-05-11 04:53:02: (response.c.570) Path : /usr/local/shieldone/www/cgi-bin/firewall/policy
2012-05-11 04:53:02: (response.c.719) -- handling subrequest
2012-05-11 04:53:02: (response.c.720) Path : /usr/local/shieldone/www/cgi-bin/firewall/policy
2012-05-11 04:53:02: (mod_access.c.135) -- mod_access_uri_handler called
2012-05-11 04:53:02: (response.c.128) Response-Header:
HTTP/1.1 200 OK
Content-Length: 0
Date: Thu, 10 May 2012 19:53:02 GMT
Server: lighttpd/1.4.30

I deleted the symlink for the CGI program. And then I copied the original program to new one.
At that time I got the expected result page.
The logs are following;
2012-05-11 04:54:18: (response.c.300) -- splitting Request-URI
2012-05-11 04:54:18: (response.c.301) Request-URI : /cgi-bin/firewall/policy
2012-05-11 04:54:18: (response.c.302) URI-scheme : https
2012-05-11 04:54:18: (response.c.303) URI-authority: localhost:8080
2012-05-11 04:54:18: (response.c.304) URI-path : /cgi-bin/firewall/policy
2012-05-11 04:54:18: (response.c.305) URI-query :
2012-05-11 04:54:18: (response.c.349) -- sanatising URI
2012-05-11 04:54:18: (response.c.350) URI-path : /cgi-bin/firewall/policy
2012-05-11 04:54:18: (mod_access.c.135) -- mod_access_uri_handler called
2012-05-11 04:54:18: (response.c.470) -- before doc_root
2012-05-11 04:54:18: (response.c.471) Doc-Root : /usr/local/shieldone/www
2012-05-11 04:54:18: (response.c.472) Rel-Path : /cgi-bin/firewall/policy
2012-05-11 04:54:18: (response.c.473) Path :
2012-05-11 04:54:18: (response.c.521) -- after doc_root
2012-05-11 04:54:18: (response.c.522) Doc-Root : /usr/local/shieldone/www
2012-05-11 04:54:18: (response.c.523) Rel-Path : /cgi-bin/firewall/policy
2012-05-11 04:54:18: (response.c.524) Path : /usr/local/shieldone/www/cgi-bin/firewall/policy
2012-05-11 04:54:18: (response.c.541) -- logical > physical
2012-05-11 04:54:18: (response.c.542) Doc-Root : /usr/local/shieldone/www
2012-05-11 04:54:18: (response.c.543) Rel-Path : /cgi-bin/firewall/policy
2012-05-11 04:54:18: (response.c.544) Path : /usr/local/shieldone/www/cgi-bin/firewall/policy
2012-05-11 04:54:18: (response.c.561) -
handling physical path
2012-05-11 04:54:18: (response.c.562) Path : /usr/local/shieldone/www/cgi-bin/firewall/policy
2012-05-11 04:54:18: (response.c.569) -- file found
2012-05-11 04:54:18: (response.c.570) Path : /usr/local/shieldone/www/cgi-bin/firewall/policy
2012-05-11 04:54:18: (response.c.719) -- handling subrequest
2012-05-11 04:54:18: (response.c.720) Path : /usr/local/shieldone/www/cgi-bin/firewall/policy
2012-05-11 04:54:18: (mod_access.c.135) -- mod_access_uri_handler called
2012-05-11 04:54:18: (response.c.128) Response-Header:
HTTP/1.1 200 OK
Expires: Wed, 09 May 2012 19:54:18 GMT
Date: Thu, 10 May 2012 19:54:18 GMT
Content-Type: text/html; charset=euc-kr
Transfer-Encoding: chunked^M
Server: lighttpd/1.4.30

When I used the Apache server, there was no problem. I'm eager to migrate Apache to Lighttp.
I think that the follow-symlink option works well. I don't know why the results between pure CGI and symlink one are different.
Please let me know what I can do to fix this problem.

Thanks.