Created
February 15, 2014 12:14
-
-
Save matthieuauger/9018551 to your computer and use it in GitHub Desktop.
Nginx & PHP-FPM configuration for phpMyAdmin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name phpmyadmin.yourdomain.com; | |
access_log /var/log/nginx/phpmyadmin_access.log; | |
error_log /var/log/nginx/phpmyadmin_error.log; | |
root /usr/share/phpmyadmin; | |
index index.php; | |
location / { | |
try_files $uri $uri/ @phpmyadmin; | |
} | |
location @phpmyadmin { | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
# If nginx running on TCP socket, comment line above and uncomment line beneath | |
#fastcgi_pass 127.0.0.1:9000; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin/index.php; | |
fastcgi_param SCRIPT_NAME /index.php; | |
} | |
location ~ \.php$ { | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
# If nginx running on TCP socket, comment line above and uncomment line beneath | |
#fastcgi_pass 127.0.0.1:9000; | |
include fastcgi_params; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$fastcgi_script_name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had to modify mine as follows for it to work;
`server {
listen 80;
server_name phpmyadmin.yourdomain.com;
}`