diff --git a/phpmyadmin.nginx.conf b/phpmyadmin.nginx.conf new file mode 100644 index 0000000000000000000000000000000000000000..688d64e77de0ff5914e5b61b6d465fa6c7388163 --- /dev/null +++ b/phpmyadmin.nginx.conf @@ -0,0 +1,35 @@ +# Configuration for phpMyAdmin -- set it up to use php-fpm etc. +server { + listen 80; + listen 8081; + root /home/gliders/phpma; + index index.php index.html index.htm; + server_name _; # update with actual hostname when we get it + + location / { + try_files $uri $uri/ /index.php; + } + + error_page 404 /404.html; + error_page 500 502 503 504 /50x.html; + + # Serve static files directly + location ~* \.(png|jpe?g|gif|ico)$ { + expires 1y; + access_log off; + try_files $uri $uri/ @rewrite; + gzip off; + } + location ~* \.(css|js)$ { + expires 1d; + access_log off; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } +}