Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Oct 14, 2013 10:37 am 
Offline
Newbie

Joined: Fri Oct 11, 2013 1:55 pm
Posts: 4
I'm trying to get Nginx and PHP-FastCGI on Ubuntu 12.04 LTS configured correctly, but running into problems. Any help is appreciated. I will provide any additional information if needed.

I have two nginx configuration files at:
/etc/nginx/nginx.conf
/etc/nginx/sites-available/mysite.com

Issue 1: mysite.com/info.php "File not found."

I've created a doc named info.php in /usr/share/nginx/html. When I attempt to visit the file, I get "File not found." as my error message. I see no place in my configuration files where /usr/share/nginx/html is specified...should that be set as root somewhere? My websites files are in /srv/www/mysite.com/public_html which is set as the root in /etc/nginx/sites-available/mysite.com

Issue 2: mysite.com/importbuddy.php "Error #224834. This directory is not write enabled. Please verify write permissions to continue."

I have a doc named importbuddy.php to import a wordpress website in /srv/www/mysite.com/public_html. I believe the error message I receive when I try to visit this site is due to my php-fpm/php-fcgi server not having write permissions in this directory, but I'm not sure how to enable write permissions for the php-fpm/php-fcgi server.



Additional information:

I have gone back and forth in /etc/php5/fpm/pool.d/www.conf and /etc/nginx/sites-available/gogogainesville.com changing the "listen =" and "fastcgi_pass" parameters, respectively. The parameters I've tried are:

listen = 127.0.0.1:9000;
listen = /var/run/php5-fpm.sock;
listen = /tmp/php5-fpm.sock;
listen = /var/run/php-fastcgi/php-fastcgi.socket;

In the last case, I created an executable file /usr/bin/php-fastcgi with the following contents (where 'my_user' is the user who owns /srv/www/*):

File:/usr/bin/php-fastcgi
#!/bin/bash
FASTCGI_USER=my_user
FASTCGI_GROUP=my_user
SOCKET=/var/run/php-fastcgi/php-fastcgi.socket
PIDFILE=/var/run/php-fastcgi/php-fastcgi.pid
CHILDREN=6
PHP5=/usr/bin/php5-cgi
/usr/bin/spawn-fcgi -s $SOCKET -P $PIDFILE -C $CHILDREN -u $FASTCGI_USER -g $FASTCGI_GROUP -f $PHP5


I've installed the following:
spawn-fcgi
php5-cli
php5-cgi
php5-fpm
psmisc


If anyone can shed some light on my config. issues or point me in a good direction, I'd really appreciate it.


Top
   
PostPosted: Tue Oct 15, 2013 11:23 pm 
Offline
Junior Member

Joined: Fri Oct 04, 2013 7:23 pm
Posts: 28
I unfortunately had VERY similar if not exactly the same problems setting this same combo up. 2 Weeks into owning a Linode I called it impossible as of now and switched to apache unfortunately. Would love to hear a fix on this one.


Top
   
PostPosted: Wed Oct 16, 2013 5:09 am 
Offline
Senior Member

Joined: Fri Feb 17, 2012 8:20 pm
Posts: 365
Tantrik wrote:
I unfortunately had VERY similar if not exactly the same problems setting this same combo up. 2 Weeks into owning a Linode I called it impossible as of now and switched to apache unfortunately. Would love to hear a fix on this one.


Impossible? :/ There's plenty of guides available on setting this up.

Now I don't use spawn-fcgi (I use PHP-FPM/FastCGI)and I do it with Debian and nginx - I have a Dutch guide here: http://www.pcwebplus.nl/phpbb/viewtopic ... 72&t=10320

Google translate should work for it, just keep the dutch version for commands/code block references.

Good luck


Top
   
PostPosted: Wed Oct 16, 2013 5:16 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
I've a stack script that sets up a LEMP stack. https://www.linode.com/stackscripts/vie ... iptID=4745 it could do with an update but it should still work fine.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
PostPosted: Tue Dec 24, 2013 3:14 pm 
Offline

Joined: Tue Dec 24, 2013 3:12 pm
Posts: 1
Have you checked that you have a symbolic link to /sites-enabled/* ?

Remember that Nginx only listens to sites-enabled, and you'll need to create a symbolic link between your mysite.com conf file in sites-available to a similar one in sites-enabled.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group