Showing posts with label Apache2. Show all posts
Showing posts with label Apache2. Show all posts

Friday, July 3, 2015

Improve Apache Web Server Security

Improve Apache Web Server Security: Use ServerTokens and ServerSignature to Disable Header
When Apache HTTPD web server generates any web pages or error pages, some important information about the version and other details implemented on the system are displayed in the web site server header.

IE: Server: Apache/2.0.53 (Ubuntu) PHP/4.3.10-10ubuntu4 Server at xx.xx.xx.xx Port 80

Fix possible security issue, modify these two directives ServerTokes and ServerSignature in httpd.conf configuration file.

To ensure that the Apache HTTP web server does not broadcast this message to the whole world publicly and fix possible security issue,

modify these two directives

  • ServerTokes
  • ServerSignature

In httpd.conf configuration file.

Login as root user or perform a sudo to the web server.

Open and edit httpd.conf or apache2.conf (in Apache 2) with vi or other text editor. The Apache configuration normally located in /etc/httpd/conf/ or /etc/apache2/ or /etc/apache/ (for Apache1.3) depending on which Unix you’re using.

Locate the line with ServerTokens. You can perform a search by typing “/ServerTokes” and hit Enter.

In Apache 1.3, you will likely to see a line starts with #ServerTokes Full In this case, remove or delete the # character (by pressing d key).

Also modify the Full to become Prod (press r key to replace one character, or R to replace multiple characters), so that the line becomes ServerTokens Prod. 

In Apache 2.0 or 2.2, the line normally does not exist. So the search will fail. In this case, go to the bottom of config file, and add the new line with the following text. You can add new line by pressing o key.

ServerTokens Prod

Next, search for ServerSignature. In Apache13, the line should just above the line of ServerTokens. Edit the line so that it looks like this, and in Apache2 which doesn’t already have this line, add in at new one.

ServerSignature Off

By now the Apache configuration file should have this two directives set as below:

ServerSignature Off ServerTokens Prod


The first line “ServerSignature Off” instructs Apache not to display a trailing footer line under server-generated documents (error messages, mod_proxy ftp directory listings, mod_info output, and etc) which displays server version number, ServerName of the serving virtual host, email setting, and creates a “mailto:” reference to the ServerAdmin of the referenced document.

The second line “ServerTokens Prod” configures Apache to return only Apache as product in the server response header on very page request, suppressing OS, major and minor version info.

Save and close the config file by pressing Shift-Colon, and then type “wq” keys, and hit Enter.
Restart Apache. Typical command is 

service httpd restart or /etc/init.d/apache2 restart.

Now, you will get only the Apache in the server response header:

Server: Apache


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Tuesday, January 13, 2015

Enable htaccess in Apache 2.4.7 on Ubuntu

Enable htaccess in Apache 2.4.7 on Ubuntu

open terminal
ctrl+alt+t 
 open etc folder into this open apache2
etc->apache2->apache2.conf 
into this file 
  <Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride none
    Require all denied
</Directory>
<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>
 
First enable rewrite using this command:
sudo a2enmod rewrite
Then restart apache2:
sudo service apache2 restart 
Enjoy :) 

Thursday, January 8, 2015

How to login without password in phpMyAdmin

How to login without password in phpMyAdmin 



paswordless root login for MySQL. phpMyAdmin however is by default set to not allow that.

If disabled, you'll get the following error when trying to log in without entering the password;


location



/etc/phpmyadmin/config.inc.php


 To enable the option, uncomment or add the following line;
$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;

there is two times this line  remove comment 
 

The line above need to be added twice; once within within the
if (!empty($dbname)) 
{ statement, and another one outside of it
 (probably towards the end of the configuration file). 

How to install phpmyadmin on ubuntu 14.04

How to install phpmyadmin on ubuntu 14.04

Phpmyadmin is a free web tool used to administrative MySQL database. You can perform all major tasks like creating ,

1. Apache2 installation

sudo apt-get update


2. Mysql installation 


sudo apt-get install phpmyadmin

"During the installation, You will prompted to choose the type of web server . just choose “apache2″."

Now you will be prompted for mysql database configuration, just choose “No” as we already configured mysql server manually and hit enter to complete the installation 

open the path “http://localhost/phpmyadmin” in the browser , you will prompted for username and password . just type Mysql root username and password given during the Mysql installation

If you are getting “Page not found” issue .Include the below line in /etc/apache2/apache2.conf file.

" Include /etc/phpmyadmin/apache.conf "

after that command

sudo /etc/init.d/apache2 restart 


Enjoy :)


if there is an ISSUE in password then 

click here 

install LAMP in ubuntu (Linux)

LAMP is used to create web project in linux 14.4



LAMP 

Linux Apache MySql Phpmyadmin

use the basic 6 step and Enjoy :)


1. Install Apache
sudo apt-get install apache2


2. Install MySQL
To install MySQL you must install the Metapackage mysql-server. This can be done by searching for and installing in the Software Centre, or by running the following command.
sudo apt-get install mysql-server

3. Install PHP
install the Metapackages php5 and libapache2-mod-php5.sudo apt-get install php5 libapache2-mod-php5

4. Restart Server
sudo /etc/init.d/apache2 restart

5. Check Apache
Open a web browser and navigate to http://localhost/. You should see a message saying It works!

6. Check PHP
php -r 'echo "\n\nYour PHP installation is working fine.\n\n\n";'


Congratulations, you have just Installed a Ubuntu LAMP Server!

Monday, October 13, 2014

wamp server not work



wamp server not work but server is online my wamp server 2.4

Step1

 



1.Quit your skype and then again restart your wamp


Problem Not solved ? 

Follow 

step 2

Solution for MSVCR100.dll is missing when WAMP server install

This MSVCR100.dll is missing when WAMP server install problem mostly happen when you install new ‘Operating system’. It’s a general problem but its soved easily  follow the next steps
Step 1.
That MSVCR100.dll file is one part of Microsoft Visual C++. IF this component is missing means, ‘Apache Server’ won’t run. So, download following exe file and just install that. It’s enough for MSVCR100.dll is missing when WAMP server install problem.
For Windows 32 bit OS:
Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)

Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)

Here just select your Language and click ‘Download’ Button. You will get ‘vcredist_x86.exe’ file. Just Download that file and install as usual( double click ).
windows 64

restart PC and check
If the problem is not solved yet the follow step 3

Stp3

3 changeWampServer port



Sometimes wamp server

WampServer is a Windows web development environment. It allows you to createweb applications with Apache2, PHP and a MySQL database. This post basically explain how to change WampServer Port. The reason we need to changeWampServer port to avoid the same port used for IIS (Internet Information Services) or Xampp which results in failure of installation or running the application perfectly.

Here is steps taken to change the port for WampServer

1. After installation, left click the wamp icon
2. Go to “apache” and choose “httpd.conf”
3. Find the word “Listen 80″ 
4. Replace with “Listen 8080″.

Take note that 8080 is an example of port number. Feel free to pick any number to be the port number for WampServer.

5. Save the file and restart the application

6. Use http://localhost:8080 to access the WampServer

Thank You


How to Host a Laravel Project on Hostinger’s hPanel: A Step-by-Step Guide

How to Host a Laravel Project on Hostinger’s hPanel: A Step-by-Step Guide If you're looking to host a Laravel project on Hostinger’s hPa...