Search this site

Showing posts with label Apache. Show all posts
Showing posts with label Apache. Show all posts

Sunday, February 3, 2019

Change phpmyadmin's URL in ubuntu

A few years ago I put some note for windows here
and now I will make one for ubuntu

So for example, I want to change my phpmyadmin link
default: 127.0.0.1/phpmyadmin and I want to change it to 127.0.0.1/myownlink

we need to change 1 setting in apache2
sudo nano /etc/apache2/conf-enabled/phpmyadmin.conf
change the alias
Alias /phpmyadmin /usr/share/phpmyadmin
to
 Alias /myownlink /usr/share/phpmyadmin

then we need to activate and restart apache2 (maybe only restart apache2 will do it)
 sudo a2enconf phpmyadmin.conf
 sudo systemctl reload apache2.service

done yey \o/ 

MySQL in ubuntu 18.04 (update)

It was a long time ago, I make a post (or my personal note) about how to install MySQL in ubuntu
and it seems now, the version and how to install is already changed so I make this post.

previous post here

Step:
0. apt get update (start with this)
sudo apt-get update
1. Installing MySQL
sudo apt-get install mysql-server
1.1. mysql secure installation (optional but recommended)
sudo mysql_secure_installation
2. Installing apache2
sudo apt-get install apache2
3. Installing phpmyadmin
sudo apt-get install phpmyadmin
4. connect apache2 and phpmyadmin
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
5. activate it
sudo a2enconf phpmyadmin.conf
6. restart apache
sudo systemctl reload apache2.service

ok done

Tuesday, February 4, 2014

Enable login in phpmyadmin

Now I want to enable login in my phpmyadmin

First change root password (both) using phpmyadmin
Then after you change it, it will send you an error message
Open this file
C:\xampp\phpMyAdmin\config.inc.php
Change the line 19
$cfg['Servers'][$i]['auth_type'] = 'config';
To
$cfg['Servers'][$i]['auth_type'] = 'cookie';
And also line 23
$cfg['Servers'][$i]['AllowNoPassword'] = true;
To
$cfg['Servers'][$i]['AllowNoPassword'] = false;
After that restart you apache
Done
 

Sunday, January 26, 2014

Apache can't restart

When I restart apache, I get this message:
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
The solution is

  • sudo nano /etc/apache2/httpd.conf or apache2.conf
  • Add: ServerName localhost
  • And restart apache: sudo /etc/init.d/apache2 restart

Source: link

Installing apache, PHP5, and MySQL in ubuntu

Well, this blog will be my own note for something like this.
I hope this also help someone who still don't know how to install it.

Step:
1. sudo su (must be root)
2. Installing MySQL

  • apt-get install mysql-server mysql-client
  • To check: type mysql in terminal

3. Installing Apache2

  • apt-get install apache2
  • To check: go to your browser and open your IP for example localhost (if you using xampp) or http://192.168.0.100 
  • Apache's default document root is /var/www on Ubuntu, and the configuration file is /etc/apache2/apache2.conf. Additional configurations are stored in subdirectories of the/etc/apache2 directory such as /etc/apache2/mods-enabled (for Apache modules), /etc/apache2/sites-enabled (for virtual hosts), and /etc/apache2/conf.d. 

4. Installing PHP5

  • apt-get install php5 libapache2-mod-php5
  • After that restart apache
  • /etc/init.d/apache2 restart 
  • To check: go to /var/www and make info.php like this

phpinfo();
?>

  •  And open it with your browser IP/info.php or http://192.168.0.100/info.php

5. MySQL support PHP5

  • we need MySQL for PHP5 support
  • apt-cache search php5
  • pick anything you need
  • apt-get install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
  • After that restart apache again
  • /etc/init.d/apache2 restart
  • To check: reopen info.php and it will show some new module

6. Install phpmyadmin

  • to help us to manage mysql
  • apt-get install phpmyadmin
  • To check: go to your browser, open your IP/phpmyadmin or http://192.168.0.100/phpmyadmin

Source: link