Guest User

Untitled

a guest
Jan 12th, 2011
243
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from nginx.conf:
  2.  
  3.     server {
  4.         listen 80;
  5.         server_name phpmyadmin.domain.com;
  6.         access_log /home/fanboy/logs/phpmyadmin.access_log;
  7.         error_log /home/fanboy/logs/phpmyadmin.error_log;
  8.  
  9.     location / {
  10.         root /usr/share/phpmyadmin;
  11.         index index.php;
  12.         }
  13.  
  14.     location ~ \.php$ {
  15.         fastcgi_pass 127.0.0.1:8888;
  16.         fastcgi_index index.php;
  17.         fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$fastcgi_script_name;
  18.         include /usr/local/nginx/conf/fastcgi.conf;
  19.         }
  20.     }
  21.  
  22. phpmyadmin location: /usr/share/phpmyadmin
  23.  
  24. /usr/bin/spawn-fcgi -a 127.0.0.1 -p 8888 -u www-data -C 2 -f /usr/bin/php5-cgi
  25.  
  26. fastcgi.conf:
  27. fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
  28. #fastcgi_param  SCRIPT_FILENAME    $fastcgi_script_name;
  29. fastcgi_param  QUERY_STRING       $query_string;
  30. fastcgi_param  REQUEST_METHOD     $request_method;
  31. fastcgi_param  CONTENT_TYPE       $content_type;
  32. fastcgi_param  CONTENT_LENGTH     $content_length;
  33.  
  34. fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
  35. fastcgi_param  REQUEST_URI        $request_uri;
  36. fastcgi_param  DOCUMENT_URI       $document_uri;
  37. fastcgi_param  DOCUMENT_ROOT      $document_root;
  38. fastcgi_param  SERVER_PROTOCOL    $server_protocol;
  39.  
  40. fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
  41. fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;
  42.  
  43. fastcgi_param  REMOTE_ADDR        $remote_addr;
  44. fastcgi_param  REMOTE_PORT        $remote_port;
  45. fastcgi_param  SERVER_ADDR        $server_addr;
  46. fastcgi_param  SERVER_PORT        $server_port;
  47. fastcgi_param  SERVER_NAME        $server_name;
  48.  
  49. # PHP only, required if PHP was built with --enable-force-cgi-redirect
  50. fastcgi_param  REDIRECT_STATUS    200;
RAW Paste Data