Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer

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

share|improve this answer
    
thanks it work but localhot shows forbidden and 500 internal server error for localhost/site –  Mhmdgomma Jun 13 '13 at 8:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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