Tikejhya: Ashish Nepal

Knowledgebase

Category: Lighttpd (Page 1 of 2)

[ERROR]: spawning fcgi failed.

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

(mod_fastcgi.c.1397) [ERROR]: spawning fcgi failed.
(server.c.964) Configuration of plugins failed. Going down.
(log.c.166) server started
(mod_fastcgi.c.1103) the fastcgi-backend /usr/local/php5/bin/php-cgi failed to start:
(mod_fastcgi.c.1107) child exited with status 2 /usr/local/php5/bin/php-cgi
(mod_fastcgi.c.1110) If you’re trying to run your app as a FastCGI backend, make sure you’re using the FastCGI-enabled version.
If this is PHP on Gentoo, add ‘fastcgi’ to the USE flags.
(mod_fastcgi.c.1397) [ERROR]: spawning fcgi failed.
(server.c.964) Configuration of plugins failed. Going down.

bin-path location and ensure php-cgi exists

nginx redirect loop

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

The page isn’t redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

I have noticed that this could happen in many diff reasons.

1) Nginx Configuration
e.g. http://stackoverflow.com/questions/4616521/nginx-configuration-leads-to-endless-redirect-loop

2) can be when you dont have extforward trusted on backend server which is used from nginx(as reverse proxy).

e.g.
extforward.headers = (“X-Forwarded-For”, “Forwarded-For”)

extforward.forwarder = (
“192.168.1.2” => “trust”
)

Printing parsed config-file.

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

Lighttpd

Printing parsed config-file.

lighttpd -pf /data/etc/lighttpd/lighttpd.conf

-p print the parsed config-file in internal form, and exit
-t test the config-file, and exit
-f filename of the config-file

kernel: php-cgi[7094]: segfault at

Apr 23 17:50:12 web1 kernel: php-cgi[7094]: segfault at ffffffffffffffff ip 00007f27b67e67b8 sp 00007ffff22d8f28 error 6 in libpthread-2.12.so[7f27b67dc000+17000]

Solution:

This is permision issue.
[probably check ur php.ini path for apc or things like that]

kernel: php-cgi[7094]: segfault at in libpthread-2.12.so

Apr 23 17:50:12 web-server kernel: php-cgi[7094]: segfault at ffffffffffffffff ip 00007f27b67e67b8 sp 00007ffff22d8f28 error 6 in libpthread-2.12.so[7f27b67dc000+17000]

Solution:
This is probably permission issue.

301 rewriterule

how to write 301 rewrite rule with wordpress website.

i.e. i have a website called tikejhya.com and i want to redirect specific pages to ashishnepal.com/specific directories ..

RewriteCond %{HTTP_HOST} ^www.ashishnepal.com$
RewriteRule ^deal/(.*)$ “http://www.ashishnepal.com/deal/$1” [R=301,L]
RewriteRule ^page/(.*)$ “http://www.ashishnepal.com/page/$1” [R=301,L]
RewriteRule ^deal/view/(.*)$ “http://www.ashishnepal.com/deal/view/$1” [R=301,L]

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

How to force trailing slash in lighttpd

How to force trailing slash in lighttpd

$SERVER["socket"] == "xxx.xxx.xxx.xxx:80" {
        server.name = "ashishnepal.com"
server.document-root = "/www-root/"
accesslog.filename = "/logs/www/access_log"
server.errorlog = "/logs/www/error_log"
url.redirect = ("^(.*[^/])$" => "$1/") }

######################################
# exclude .ext
#######################################

$HTTP[“url”] !~ “^(.*)(..{3}|/)$” {
url.redirect = (
“.*” => “%1/”
)

#####################################
# everything redirect
#####################################

url.redirect = (“^(.*[^/])$” => “$1/”)

lighttpd configuration sample (basic)

server.document-root= “/data/www/”
server.use-ipv6 = “disable”
server.errorlog = “/data/logs/www/error.log”
server.bind = “0.0.0.0”
server.port = “80”
server.tag =”Daemon”

debug.log-request-handling = “enable”
server.dir-listing = “enable”
accesslog.filename= “/data/logs/www/access.log”

server.modules = (
“mod_access”,
“mod_accesslog”,
“mod_fastcgi”,
“mod_rewrite”,
“mod_auth”,
)

index-file.names = ( “index.php”, “index.html”, “index.htm”, “default.htm”, “index.php5” )

fastcgi.server = ( “.php” => ((
“bin-path” => “/usr/bin/php-cgi”,
“socket” => “/tmp/php.socket”
)))

mimetype.assign = (
“.html” => “text/html”,
“.txt” => “text/plain”,
“.sql” => “text/plain”,
“.jpg” => “image/jpeg”,
“.png” => “image/png”,
“.css” => “text/css”,
“.css.minimal” => “text/css”,
“.js” => “text/javascript”,
“.js.minimal” => “text/javascript”
)
var.cache_dir = “/var/cache/lighttpd”
server.username = “lighttpd”
server.groupname = “lighttpd”

url.access-deny = ( “~”, “.inc” )

static-file.exclude-extensions = ( “.php”, “.pl”, “.fcgi”, “.scgi” )

$HTTP[“url”] =~ “.gz*” {
Content-Encoding = “gzip”,
Content-Type = “text/html”
}

dlopen() failed for: /usr/lib/lighttpd/mod_fastcgi.so

root@localhost logs]# service lighttpd restart
Stopping lighttpd: [FAILED]
Starting lighttpd: 2012-03-10 15:53:52: (plugin.c.169) dlopen() failed for: /usr/lib/lighttpd/mod_fastcgi.so /usr/lib/lighttpd/mod_fastcgi.so: cannot open shared object file: No such file or directory
2012-03-10 15:53:52: (server.c.650) loading plugins finally failed

Solution:

yum install lighttpd-fastcgi

Lighttpd ssl Configuration

# kb.ashishnepal.com
$SERVER["socket"] == "xxx.xxx.xxx.xxx:443" {
        server.name = "kb.ashishnepal.com"
        server.document-root= "/var/www/html/"

        accesslog.filename = "/var/log/ssl_access_log"

        ssl.engine = "enable"
        ssl.pemfile = "/etc/ssl/kb.ashishnepal.com.pem"
        ssl.ca-file = "/etc/ssl/ashishnepal.com_ca.bundle.crt"
        ssl.use-sslv2 = "disable"

        ssl.use-sslv3 = "enable"

        ssl.cipher-list = "ALL:-ADH:!kEDH:!EXPORT:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP"

        alias.url = (
                "/something/" => "/var/www/html/something/",
        )
}

Page 1 of 2

Powered by WordPress & Theme by Anders Norén