nginx_phpmyadmin_wheezy.conf
· 2.1 KiB · Text
Raw
location /phpmyadmin {
root /usr/share/;
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/;
}
location ~ /(libraries|setup/frames|setup/libs) {
deny all;
}
location ~ ^/phpmyadmin/setup/(.+\.php)$ {
auth_basic "phpMyAdmin Setup";
auth_basic_user_file "/etc/phpmyadmin/htpasswd.setup";
alias /usr/share/phpmyadmin/setup/$1;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
| 1 | location /phpmyadmin { |
| 2 | root /usr/share/; |
| 3 | location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { |
| 4 | root /usr/share/; |
| 5 | } |
| 6 | location ~ /(libraries|setup/frames|setup/libs) { |
| 7 | deny all; |
| 8 | } |
| 9 | location ~ ^/phpmyadmin/setup/(.+\.php)$ { |
| 10 | auth_basic "phpMyAdmin Setup"; |
| 11 | auth_basic_user_file "/etc/phpmyadmin/htpasswd.setup"; |
| 12 | alias /usr/share/phpmyadmin/setup/$1; |
| 13 | fastcgi_split_path_info ^(.+\.php)(/.+)$; |
| 14 | fastcgi_pass unix:/var/run/php5-fpm.sock; |
| 15 | fastcgi_index index.php; |
| 16 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
| 17 | include fastcgi_params; |
| 18 | } |
| 19 | location ~ ^/phpmyadmin/(.+\.php)$ { |
| 20 | try_files $uri =404; |
| 21 | root /usr/share/; |
| 22 | fastcgi_pass unix:/var/run/php5-fpm.sock; |
| 23 | fastcgi_index index.php; |
| 24 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
| 25 | include fastcgi_params; |
| 26 | } |
| 27 | } |