Xi6.org

Archive for March 14th, 2009

Apache web server slow to respond, Poor performance Ubuntu Linux

by on Mar.14, 2009, under linux/ubuntu

If you’re finding that when going to your web page it’s taking a little too long to make the connection, or its just running sluggsih – it may be trying to resolve your ip via a DNS lookup.

There are many performance tweaking options to tune your apache configuration, but I’m going to start by handling just this one.

Now by default HostnameLookups should be Off. And can be found in

/etc/apache2/apache2.conf
HostnameLookups Off

But you may also want to add it to the httpd.conf

/etc/apache2/httpd.conf

And restart apache

sudo /etc/init.d/apache2 restart

This may or may not fix your performance issues, but it sure did help me greatly! (Even though it was set to off in the apache2.conf file, adding it to the httpd.conf file increased my performance)

An interesting article you may find useful HERE

Leave a Comment :, , , , more...

SSH Slow to respond for password input (timeout problems) Ubuntu Linux

by on Mar.14, 2009, under linux/ubuntu

If you find your SSH client is taking too long to connect (and ask you for the password), or you’re trying to SFTP and it’s timing out before the password prompt. It’s probably trying to do a DNS lookup!

It’s a quick and easy fix! Just edit the following file:

/etc/ssh/sshd_config

And add or change the following:

UseDNS no

Restart SSH

sudo /etc/init.d/ssh restart

6 Comments :, , , , more...

SSL Certificates (ssl_error_rx_record_too_long) Ubuntu Linux

by on Mar.14, 2009, under linux/ubuntu

It seems obvious you’ve come across the following error while trying to setup SSL certificates on apache.

Error code: ssl_error_rx_record_too_long

Well more often than not, you have something mis-configured! (Likely the listening port: 443). What you might want to do is check that your firewall or iptables allows incoming connections on 443.

Ubuntu:

#sudo ufw allow 443

Ok, wonderful – that probably didn’t fix your problem. But now try going to the following address

http://www.domain.tld:443

If you’ve successfully seen something at the above page, it means your sites are listening on that port for non-ssl. I’ll assume that your apache virtual host file has something along the lines of:

NameVirtualHost *

<VirtualHost *>

What you’re going to want to do is force your vhosts to listen specifically on the proper ports. Changing to the following:

NameVirtualHost *:80

<VirtualHost *:80>

If you’re using ubuntu your ports.conf file should likely have 443 enabled on the listening port, and you may also have default-ssl listed in your /etc/apache2/sites-available/ folder. In which case you may want to enable that.

#sudo a2ensite /etc/apache2/sites-available/default-ssl

Basically that file has the following inside of it

<IfModule mod_ssl.c>
<VirtualHost _default_:443>
…… your server name / document root …..
SSLEngine on
SSLCertificateFile    /etc/ssl/certs/server.crt
SSLCertificateKeyFile /etc/ssl/private/server.key</VirtualHost>
</IfModule>

While you can use a single “shared” SSL certificate for multiple hosts, if each host needs it’s own SSL, they will need static ip addresses.

2 Comments :, , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...