# /etc/init.d/nginx start
Warning: Invalid argument supplied for foreach() in /etc/init.d/nginx.php on line 230
spawn-fcgi.c.229: child exited with: 0
spawn-fcgi.c.229: child exited with: 0
spawn-fcgi.c.229: child exited with: 0
spawn-fcgi.c.229: child exited with: 0
spawn-fcgi.c.229: child exited with: 0
502 Bad Gateway
nginx/0.7.26
I have this error
[[email protected] init.d]# /etc/init.d/nginx restart
[ÉCHOUÉ]
Warning: Invalid argument supplied for foreach() in /etc/rc.d/init.d/nginx.php on line 248
2008/12/04 11:58:34 [info] 15267#0: the configuration file /tmp/nginx.conf syntax is ok
11:58:34 4-12-08: [FATAL] Generated configuration has an error.
Please report this problem.
11:58:34 4-12-08: [FATAL] Error details is as following :
[[email protected] init.d]#
Which by extension means lose your business if it depends on search engine placement from friendly URLs. Then there is the issue of server-side stats.be prepared to lose:
- .htaccess
- mod_rewrite
Which by extension means lose your business if it depends on search engine placement from friendly URLs. Then there is the issue of server-side stats.
With the hefty speed penalty of FastCGI as compared to Apache's CLI, I would think the mix of traffic would have to be heavily weighted toward static content for this combination to compete. lighttpd could not come even close to competing with Apache for dynamic content after 2.0 was relased, and its plight is considerably worse against 2.2.
I would think using NGINX or similar lightweight server to offload Apache for static content, would be a more logical fit. I think this is born out by where these types of servers are used in that role today, YouTube being one of them.
Thanks!
conf/mime.types in nginx.php should be just mime.types, because conf/mime.types full path is /usr/local/nginx/conf/conf/mime.types, the same problem with conf/fastcgi.conf, it should be replaced to fastcgi_params. And for debian systems you should use killall instead of killproc in /etc/init.d/nginx. These lines are not needed too:
Code:# Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
[[email protected] src]# cp ./spawn-fcgi /usr/local/bin/spawn-fcgi
cp: cannot stat `./spawn-fcgi': No such file or directory
[[email protected] init.d]# service nginx restart
[FAILED]
Warning: Invalid argument supplied for foreach() in /etc/rc.d/init.d/nginx.php on line 415
Warning: Invalid argument supplied for foreach() in /etc/rc.d/init.d/nginx.php on line 328
sh: -c: line 0: syntax error near unexpected token `newline'
sh: -c: line 0: `/usr/local/nginx/sbin/nginx -t -c /tmp/nginx.conf &> '
Warning: file_get_contents(/tmp/nginx.conf.out): failed to open stream: No such file or directory in /etc/rc.d/init.d/nginx.php on line 397
10:35:47 8-09-10: [FATAL] Generated configuration has an error. Please report this problem.
10:35:47 8-09-10: [FATAL] Error details is as following :
1. You use spawn-fcgi. It is very old tool. Better use php-fpm.
2. You don't support .htacces. Use fallback nginx for proxy it to apache
3. Your script don't generate default host for nginx, which point top /var/www/html (phpmyadmin is unavalible)
4. Your script rewite ALL config. It is wrong. Use include and rewrite only changed config
5. You config is very big. You can use hash map for reduce it.
I don't reccomend use it to anybody, who can't understand nginx config.
1. You use spawn-fcgi. It is very old tool. Better use php-fpm.
2. You don't support .htacces. Use fallback nginx for proxy it to apache
3. Your script don't generate default host for nginx, which point top /var/www/html (phpmyadmin is unavalible)
4. Your script rewite ALL config. It is wrong. Use include and rewrite only changed config
5. You config is very big. You can use hash map for reduce it.
I don't reccomend use it to anybody, who can't understand nginx config.
For all this solutions you may have a look into http://danginx.com/
Personal opinions are better when combined with reasons.If you're going to spend money, don't spend on this dubious product.
Get litespeed webserver instead.
Personal opinions are better when combined with reasons.
Jeff