본문 바로가기

정리중인 카테고리/전공 기술

[리눅스] nginx 1.4.6 phpMyAdmin 설정

server {

        server_name     61.105.185.91;

 

        location /phpmyadmin {

                root /usr/share/;

                index index.php index.html index.htm;

 

                location ~ ^/phpmyadmin/(.+\.php)$ {

                        try_files $uri =404;

                        root /usr/share/;

                        include fastcgi_params;

                        fastcgi_pass unix:/var/run/php5-fpm.sock;

                        fastcgi_index index.php;

                        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

 

                        fastcgi_buffers 64 16k;

                        fastcgi_buffer_size 32k;

                }

 

                location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {

                        root /usr/share/;

                }

        }

 

        location /phpMyAdmin {

                rewrite ^/* /phpmyadmin last;

        }

 

        location ~ \.php$ {

                include fastcgi_params;

                fastcgi_pass unix:/var/run/php5-fpm.sock;

                fastcgi_index index.php;

                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

 

                fastcgi_buffers 64 16k;

                fastcgi_buffer_size 32k;

        }

}