Tikejhya: Ashish Nepal

Knowledgebase

Category: Web Server’s (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

/etc/httpd/modules/mod_ssl.so: cannot open shared object file:

root@host conf.d]# service httpd configtest
httpd: Syntax error on line 210 of /etc/httpd/conf/httpd.conf: Syntax error on line 12 of /etc/httpd/conf.d/ssl.conf: Cannot load /etc/httpd/modules/mod_ssl.so into server: /etc/httpd/modules/mod_ssl.so: cannot open shared object file: No such file or directory

Installing mod_ssl for Apache on CentOS:
yum install mod_ssl
service httpd configtest
service httpd reload

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.

(network.c.722) SSL: Private key does not match the certificate public key

Starting lighttpd: Enter PEM pass phrase:
2012-09-12 04:09:51: (network.c.722) SSL: Private key does not match the certificate public key, reason: error:0906406D:PEM routines:PEM_def_callback:problems getting password /ssl/ashishnepal.com.pem
[FAILED]

Solution: Pem was not created with right file, it has to be combination of crt and nopass key file.

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”
}

Page 1 of 2

Powered by WordPress & Theme by Anders Norén