Last active
August 29, 2015 14:11
-
-
Save noppolp/d50c9a5fd6d181481d04 to your computer and use it in GitHub Desktop.
Install PHP on 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
### PhpMyAdmin (by different root) | |
$ sudo apt-get install php5-mysql phpmyadmin | |
$ sudo apt-get install php5-fpm | |
$ sudo nano /etc/nginx/sites-available/default | |
location /phpmyadmin { | |
root /usr/share/; | |
index index.php index.html index.htm; | |
} | |
location ~ ^/phpmyadmin/(.+\.php)$ { | |
root /usr/share/; | |
try_files $uri =404; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
} | |
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { | |
root /usr/share/; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment