Last active
October 13, 2015 14:28
-
-
Save diproart/6affdf649ed02c7208c2 to your computer and use it in GitHub Desktop.
PhpMyAdmin / Nginx
This file contains hidden or 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
| # in default server | |
| server { | |
| listen 8080; | |
| client_max_body_size 1024M; | |
| client_body_buffer_size 4M; | |
| location ~ \.php$ { | |
| fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
| fastcgi_pass unix:/var/run/php5-fpm.sock; | |
| fastcgi_index index.php; | |
| include fastcgi_params; | |
| fastcgi_param PHP_VALUE "mbstring.func_overload = 0"; | |
| } | |
| # $ cd /usr/share/nginx/html | |
| # $ sudo ln -s /usr/share/phpmyadmin /usr/share/nginx/html | |
| location /phpmyadmin { | |
| root /usr/share/; | |
| index index.php index.html index.htm; | |
| location ~ ^/phpmyadmin/(.+\.php)$ { | |
| try_files $uri =404; | |
| root /usr/share/; | |
| #fastcgi_pass 127.0.0.1:9000; | |
| fastcgi_pass unix:/var/run/php5-fpm.sock; | |
| fastcgi_index index.php; | |
| fastcgi_param SCRIPT_FILENAME $request_filename; | |
| # off mbstring | |
| fastcgi_param PHP_VALUE "mbstring.func_overload = 0"; | |
| include /etc/nginx/fastcgi_params; | |
| } | |
| location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { | |
| root /usr/share/; | |
| } | |
| } | |
| # deny access to .htaccess files, if Apache's document root | |
| # concurs with nginx's one | |
| # | |
| location ~ /\.ht { | |
| deny all; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment