Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Nov 30, 2011 8:45 pm 
Offline
Newbie

Joined: Wed Nov 30, 2011 8:24 pm
Posts: 4
So I followed the guide in the Linode Library for installing a LEMP server on Ubuntu 11.10, but when I type in the URL my browser tries to download the actual text file 'index.php'

I have a good feeling that 'index.php' just isn't being handled by FastCGI, so where should I look/check to see where everything went south?


Top
   
 Post subject:
PostPosted: Thu Dec 01, 2011 5:57 am 
Offline
Newbie

Joined: Mon Nov 07, 2011 11:40 am
Posts: 2
You can find some good information about PHP & fastcgi here: http://www.fastcgi.com/drupal/node/5?q=node/10

Kind regards
Michael

== Full time system administrator for hire ==


Top
   
 Post subject:
PostPosted: Thu Dec 01, 2011 11:36 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Post the contents of your nginx configuration file that's serving the site. It's probably a misconfiguration.

_________________
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
   
 Post subject: nginx.conf
PostPosted: Mon Dec 05, 2011 5:12 pm 
Offline
Newbie

Joined: Wed Nov 30, 2011 8:24 pm
Posts: 4
Below is my nginx.conf, where I have replaced the domain with ampersands for anonymity (maybe I'm paranoid :P). I will post the virtual host configuration in the next post. Enjoy.

#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
   worker_connections  1024;
}


http {
   include      mime.types;
   default_type  application/octet-stream;

   #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
   #                  '$status $body_bytes_sent "$http_referer" '
   #                  '"$http_user_agent" "$http_x_forwarded_for"';

   #access_log  logs/access.log  main;

   sendfile        on;
   #tcp_nopush    on;

   #keepalive_timeout  0;
   keepalive_timeout  65;

   #gzip  on;

   include /etc/nginx/sites-enabled/&&&&&&&&.org;




   # another virtual host using mix of IP-, name-, and port-based configuration
   #
   #server {
   #    listen      8000;
   #    listen      somename:8080;
   #    server_name  somename  alias  another.alias;

   #    location / {
   #        root  html;
   #        index  index.html index.htm;
   #    }
   #}


   # HTTPS server
   #
   #server {
   #    listen      443;
   #    server_name  localhost;

   #    ssl                  on;
   #    ssl_certificate      cert.pem;
   #    ssl_certificate_key  cert.key;

   #    ssl_session_timeout  5m;

   #    ssl_protocols  SSLv2 SSLv3 TLSv1;
   #    ssl_ciphers  HIGH:!aNULL:!MD5;
   #    ssl_prefer_server_ciphers  on;

   #    location / {
   #        root  html;
   #        index  index.html index.htm;
   #    }
   #}

}


Top
   
 Post subject: Virtual host config
PostPosted: Mon Dec 05, 2011 5:15 pm 
Offline
Newbie

Joined: Wed Nov 30, 2011 8:24 pm
Posts: 4
Here is my virtual host configuration, again with the domain replaced by ampersands.

server {

listen    80 default_server;
       access_log /srv/www/&&&&&&&&.org/logs/access.log;
       error_log /srv/www/&&&&&&&&.org/logs/error.log;
       root /srv/www/&&&&&&&&.org/public_html;
server_name     &&&&&&&&.org www.&&&&&&&&.org;



location / {
               index    index.htm index.html index.php;
}

location \.php$ {
               try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME /srv/www/&&&&&&&&.org/public_html$fastcgi_script_name;
}
}


Top
   
 Post subject:
PostPosted: Mon Dec 05, 2011 5:18 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Code:
location \.php$ { 
should be
Code:
location ~ \.php$ { 
You missed the ~

_________________
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
   
 Post subject:
PostPosted: Mon Dec 05, 2011 5:37 pm 
Offline
Newbie

Joined: Wed Nov 30, 2011 8:24 pm
Posts: 4
Damnit haha this worked. Thank you very much.


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


Who is online

Users browsing this forum: No registered users and 2 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