Chase Down My Dream

Life, Dream

  • Home
  • About
  • Sample Page
Twitter Facebook Sina RSS

phpMyAdmin runs on nginx

Posted on December 1, 2009 by stingrey
No CommentsLeave a comment

Recently, I installed phpMyAdmin from ArchLinux repository and tried to setup it to run on nginx. Compared with the phpMyAdmin instruction on Arch Wiki which is mostly written for apache, the configration on nginx is much easier.

  • make a soft link in /srv/http/nginx for phpMyAdmin:
    example: # ln -s /srv/http/nginx/phpMyAdmin /usr/share/webapps/phpMyAdmin
  • uncomment extensions(mycrypy.o and mysql.o) in /etc/php/php.ini
  • The most important step:modify nginx.conf to support phpMyAdmin:
    example:

    location ~ ^/phpMyAdmin {            root           html; <--- specify the phpMyAdmin directory             fastcgi_pass   127.0.0.1:9000;            fastcgi_index  index.php;            fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;            include        fastcgi_params;        }

Then, restart php fcgi and nginx services.

PS: using “alias html/phpMyAdmin/” to replace ‘root’ line in nginx.conf is also ok. The difference between root and alias is that root specify the parent directory of the index file, while alias specify the exact directory where the index file locates.

Categories: Linux | Tags: nginx, phpMyAdmin
无聊了~
nginx with public_html

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

*

*


question razz sad evil exclaim smile redface biggrin surprised eek confused cool lol mad twisted rolleyes wink idea arrow neutral cry mrgreen

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

  • Recent Posts

    • 一年了,我回来了
    • Un Senso Di Te
    • 好雨时节
    • 虎年来在追昔时
    • 无题
  • Recent Comments

    • hzqtc on 一年了,我回来了
    • aaahexing on Un Senso Di Te
    • RainFlying on 好雨时节
    • Stingrey on 秦时明月,侠骨柔情
    • hzqtc on 被拒了~
  • Archives

    • November 2011
    • June 2010
    • April 2010
    • February 2010
    • December 2009
    • November 2009
    • October 2009
    • September 2009
    • August 2009
    • July 2009
    • June 2009
    • May 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • September 2008
    • July 2008
  • Categories

    • C#
    • Google App Engine
    • Hello Program
    • Linux
    • Linux and Windows
    • Micolog
    • Misc
    • Mojo
    • Music and Movie
    • Windows
    • 另一个自己
    • 玩意儿
    • 生活
  • Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
© Chase Down My Dream. Proudly Powered by WordPress | Nest Theme by YChong