Created
February 11, 2014 09:36
-
-
Save denys281/8931843 to your computer and use it in GitHub Desktop.
phpmyadmin nginx virtual host (php-fpm)
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 on port 81 | |
listen 81; | |
# Server name being used (exact name, wildcards or regular expression) | |
# server_name phpmyadmin.my; | |
root /usr/share/phpmyadmin; | |
# Logging | |
error_log /var/log/phpmyadmin.access_log; | |
access_log /var/log/phpmyadmin.error_log; | |
location / { | |
index index.php; | |
} | |
## Images and static content is treated different | |
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ { | |
access_log off; | |
expires 360d; | |
} | |
location ~ /\.ht { | |
deny all; | |
} | |
location ~ /(libraries|setup/frames|setup/libs) { | |
deny all; | |
return 404; | |
} | |
# Pass the PHP scripts to FastCGI server | |
location ~ \.php$ { | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_split_path_info ^(.+\.php)(/.*)$; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$fastcgi_script_name; | |
fastcgi_param HTTPS off; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment