Within this file, we need to enter the following information: AuthType Basic We can create the necessary file and open it in our text editor with root privileges by typing: sudo nano /usr/share/phpmyadmin/.htaccess In order for this to be successful, the file must be created within the application directory. htaccess use for our application, we need to create one to actually implement some security. To implement the changes you made, restart Apache: sudo service apache2 restart When you have added this line, save and close the file. We need to add an AllowOverride All directive within the section of the configuration file, like this: We will edit the linked file that has been placed in our Apache configuration directory: sudo nano /etc/apache2/conf-available/nf htaccess file overrides by editing our Apache configuration file. htaccess Overridesįirst, we need to enable the use of. htaccess authentication and authorization functionalities. One of the easiest way of doing this is to place a gateway in front of the entire application. We need to secure the application to help prevent unauthorized use. Because of its ubiquity, phpMyAdmin is a popular target for attackers. We were able to get our phpMyAdmin interface up and running fairly easily. you can see the page as below.Step Two - Secure your phpMyAdmin Instance Step 12 » create a new file dbtest.php in the apache root path ( /var/ Step 13 » open the file in your browser ( ). We need to test mysql database connectivity in php. We have sucessfully configured Apache2, mysql and php. You can see the php information page as below.Īnd make sure you can see the mysql details in the php information page. ![]() Step 11 » Now open the file in the browser ( Eg: ) Step 10 » Now restart the apache2 service /etc/init.d/apache2 restart Goto the default apache root path /var/and paste the below code and save it. Step 9 » Create a php file and paste the below code into the file to show the php configuration. Step 8 » Type the below command to install php5 sudo apt-get install php5 php5-mysql Type 'c' to clear the current input statement. Other names may be trademarks of their respective owners. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Your MySQL connection id is 39 Server version: 5.5.24-0ubuntu0.12.04.1 (Ubuntu) Copyright (c) 2000, 2011, Oracle and/or its affiliates. Service is started already, Now Type this command to mysql -u root -p Enter password: ****** ( password provided during mysql installation ) Welcome to the MySQL monitor. Ĭheck the service status sudo /etc/init.d/mysql status mysql start/running, process 12429 ![]() Give some strong password and retype the same password for confirmation. Step 6 » It will prompt for a new password for mysql server. This command will install mysql-server and mysql-client along with dependencies. Step 5 » Install Mysql server by typing the below command in terminal sudo apt-get install mysql-server You can see the apache2 test page.( Apache default document root is located in this path /var/www/ ) Step 3 » Now restart the Apache sudo /etc/init.d/apache2 restart Step 4 » You have successfully configured apache2 with minimal configuration. ![]() Add the following line “ServerName localhost”. This command will install apache2 and other dependencies. Step 1 » Open the terminal and type the below command for installing apache 2 package from repository sudo apt-get install apache2 Testing all together Apache2 installation : Update ubuntu repositories by giving the below sudo apt-get updateĪfter updating repositories, start installing packages one by one. After installing Ubuntu 12.04 ( Ubuntu 12.04 installation step by step screenshots ) Installing apache, mysql and php on ubuntu is pretty easy, just follow the steps. In this tutorial we will learn how to install/configure own webserver on ubuntu 12.04.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |