0

I was working under LAMP stack on my laptop an decided to use nginx in place of apache2 (LEMP)

Installed nginx, php5-fpm and fast-cgi without removing any thing from LAMP stack

Stopped apache2 and started nginx trying localhost (shows server not found)

Means nginx didn't install successfully and i found that the folder

/etc/php5/{apache2 cgi cli conf.d fpm}

so which folder is unneeded especially (cgi cli fpm) and what configuration needed ?

-when restarting nginx I got that messgae: Restarting nginx: nginx: [emerg] "fastcgi_pass" directive is duplicate in /etc/nginx/sites-enabled/default~:70 nginx: configuration file /etc/nginx/nginx.conf test failed

1 Answer 1

0

the

/etc/nginx/sites-enabled/default~

is the give away.. chances are the editor you used makes a backup and appends ~ to the end. Nginx will load everything in the sites-enabled directory so it's loading default and default~ which are probably the same.

Delete

/etc/nginx/sites-enabled/default~

Then a start should work

1
  • thanks it work but localhot shows forbidden and 500 internal server error for localhost/site Jun 13, 2013 at 8:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.