Browse Source

Change phpMyAdmin Locations

old-stable
Mitesh Shah 12 years ago
parent
commit
bc8c057c2e
  1. 6
      etc/nginx/common/locations.conf
  2. 16
      usr/local/sbin/easyengine

6
etc/nginx/common/locations.conf

@ -22,12 +22,12 @@ location ~* .(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif
# PMA Settings # PMA Settings
location /pma { location /pma {
root /var/www/; root /var/www/shared;
index index.php index.html index.htm; index index.php index.html index.htm;
location ~ ^/pma/(.+\.php)$ { location ~ ^/pma/(.+\.php)$ {
try_files $uri =404; try_files $uri =404;
root /var/www/; root /var/www/shared;
fastcgi_pass php; fastcgi_pass php;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
@ -35,7 +35,7 @@ location /pma {
} }
location ~* ^/pma/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { location ~* ^/pma/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /var/www/; root /var/www/shared;
} }
} }

16
usr/local/sbin/easyengine

@ -178,19 +178,19 @@ INSTALLPMA()
echo -e "\033[34m Installing PMA... \e[0m" echo -e "\033[34m Installing PMA... \e[0m"
# Setup PMA/phpMyAdmin # Setup PMA/phpMyAdmin
mkdir -p /var/www/pma || OwnError "Unable To Create Directory: /var/www/pma" mkdir -p /var/www/shared/pma/ || OwnError "Unable To Create Directory: /var/www/shared/pma/"
# Download PMA/phpMyAdmin # Download PMA/phpMyAdmin
cd /var/www/pma || OwnError "Unable To Change Directory: /var/www/pma" #cd /var/www/shared/pma/ || OwnError "Unable To Change Directory: /var/www/shared/pma/"
wget -c http://dl.cihar.com/phpMyAdmin/master/phpMyAdmin-master-latest.tar.gz \ wget -cO /var/www/shared/pma/pma.tar.gz http://dl.cihar.com/phpMyAdmin/master/phpMyAdmin-master-latest.tar.gz \
|| OwnError "Unable To Download PMA" || OwnError "Unable To Download PMA"
# Extract PMA/phpMyAdmin # Extract PMA/phpMyAdmin
tar --strip-components=1 -zxf phpMyAdmin-master-latest.tar.gz -C /var/www/pma \ tar --strip-components=1 -zxf /var/www/shared/pma/pma.tar.gz -C /var/www/shared/pma/ \
|| OwnError "Unable To Extract PMA" || OwnError "Unable To Extract PMA"
# Remove Unwanted Files # Remove Unwanted Files
rm -f phpMyAdmin-master-latest.tar.gz rm -f /var/www/shared/pma/pma.tar.gz
} }
INSTALLMYSQL() INSTALLMYSQL()
@ -247,7 +247,7 @@ REMOVEPMA()
{ {
# Remove PMA/phpMyAdmin # Remove PMA/phpMyAdmin
echo -e "\033[34m Removing PMA... \e[0m" echo -e "\033[34m Removing PMA... \e[0m"
sudo rm -rf /var/www/pma \ sudo rm -rf /var/www/shared/pma \
|| OwnError "Unable To Remove PMA" || OwnError "Unable To Remove PMA"
} }
@ -814,7 +814,7 @@ then
INSTALLPMA INSTALLPMA
# Initialise Git # Initialise Git
EEGITDIR=/var/www/pma/ EEGITDIR=/var/www/shared/pma/
EEGITINIT EEGITINIT
# Display Success Message # Display Success Message
@ -904,7 +904,7 @@ then
EEGITINIT EEGITINIT
# Initialise Git # Initialise Git
EEGITDIR=/var/www/pma/ EEGITDIR=/var/www/shared/pma/
EEGITINIT EEGITINIT
# Initialise Git # Initialise Git

Loading…
Cancel
Save