Updating/ Installing wordpress plugins asking for FTP details

Sometimes updating/installing plugins from wordpress will ask for the FTP details. Even if we provide the details it won’t work.  To fix this issue you just need to enter the ftp details to wp-config.php file and it will never asks again.

Go to the root directory where word press is installed and open wp-config,php

vi wp-config.php

and add the below details to it

/*** FTP login settings ***/
define("FTP_HOST", "localhost");
define("FTP_USER", "yourftpusername");
define("FTP_PASS", "yourftppassword");

replace it with the original values and put it somewhere after the mysql username/password block.

I got a post while searching in internet which explains why we need to make these changes.payday loans Refer the below link for more details.

http://goo.gl/s9Fc1

 

viagra

viagra

How to create apache virtual hosts in apache2(Ubuntu)

The layout of apache configurations in rehat distros and debian distros are entirely different. I’m here explaining how to create a virtual host in ubuntu.

In your home directory create a ‘public_html’ folder and create sub directories as follows.


mkdir -p public_html/domain.com/{public,private,log,cgi-bin,backup}

And then create a sample test.html file in public_html directory. Make sure that the public_html directory has be read and executable permissions.

Now we need to add virtual host entry in sites-available directory.


nano /etc/apache2/sites-available/domain.com

# domain: domain.com
# public: /home/demo/public_html/domain.com/

<VirtualHost *:80>

  # Admin email, Server Name (domain name) and any aliases
  ServerAdmin webmaster@domain.com
  ServerName  www.domain.com
  ServerAlias domain.com

  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.html
  DocumentRoot /home/demo/public_html/domain.com/public

  # Custom log file locations
  LogLevel warn
  ErrorLog  /home/demo/public_html/domain.com/log/error.log
  CustomLog /home/demo/public_html/domain.com/log/access.log combined

</VirtualHost>

Read more

How to secure/harden your apache webserver – quick guide

In this artile I am explaining some ways to secure apache.

1 . Stay Updated

Make sure that you are installing latest updates.

2. Hide Apache version

If you do not turn this off, anyone can check which version of apache you are running by just telnet-ing to its port. So always disable this. To do this add the following to your httpd.conf

ServerSignature Off
ServerTokens Prod

 

The ServerSignature  directive adds a line containing the Apache HTTP Server server version and the ServerName to any server-generated documents, such as error messages sent back to clients. ServerSignature is set to on by default

The ServerTokens directive is used to determine what Apache will put in the Server HTTP response header. By setting it to Prod it sets the HTTP response header as follows:

Server: Apache

 

3. Apache user:group

It is common that in many servers both apache and (mail server or mysql) running under the user nobody. So if a hacker is through this it is harmful to all services. So make sure that apache is running under its own user. Open httpd.conf and make the following changes.

User apache

Group apache

 

 

Read more