Last active
December 5, 2017 03:23
-
-
Save RoccoHoward/b1e8feaf34033fb525bbe6f3fb5e96bf to your computer and use it in GitHub Desktop.
nginx-phpmyadmin-conf
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
server { | |
listen 80; | |
server_name db; | |
root /usr/share/phpmyadmin; | |
index index.php; | |
access_log off; | |
error_log /var/log/nginx/db.error.log error; | |
error_log /var/log/nginx/db.debug.log debug; | |
location = favicon.ico { | |
log_not_found off; | |
access_log off; | |
} | |
location = robots.txt { | |
allow all; | |
log_not_found off; | |
access_log off; | |
} | |
location / { | |
try_files $uri $uri/ /index.php$is_args$args; | |
} | |
# Remove trailing slash to please routing system. | |
if (!-d $request_filename) { | |
rewrite ^/(.+)/$ /$1 permanent; | |
} | |
location ~ \.php$ { | |
try_files $uri /index.php =404; | |
fastcgi_pass php; | |
fastcgi_index index.php; | |
fastcgi_split_path_info ^(.+\.php)(.*)$; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
} | |
sendfile off; | |
client_max_body_size 100m; | |
location ~ /\.ht { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment