Servers – N77 Design | NickClaeboe.com https://www.nickclaeboe.com Atlanta Web, Graphic & Flyer Design • Design Portfolio & Rates for Nick Claeboe Custom Design Work Thu, 10 Jun 2021 12:29:15 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 https://www.nickclaeboe.com/wp-content/uploads/2016/05/favicon-60x60.png Servers – N77 Design | NickClaeboe.com https://www.nickclaeboe.com 32 32 Bitnami: Start or stop services https://www.nickclaeboe.com/2021/03/03/start-or-stop-services/ Wed, 03 Mar 2021 13:29:47 +0000 http://www.nickclaeboe.com/?p=8899

Each Bitnami stack includes a control script that lets you easily stop, start and restart services. I had to save this for myself as I use these commands DAILY!

Hope this helps others as much as it does me.

Obtain the status of a service:

sudo /opt/bitnami/ctlscript.sh status

Call it without any service name arguments to start all services:

sudo /opt/bitnami/ctlscript.sh start

Or use it to restart a single service, such as Apache only, by passing the service name as argument:

sudo /opt/bitnami/ctlscript.sh restart apache

Use this script to stop all services:

sudo /opt/bitnami/ctlscript.sh stop

Restart the services by running the script without any arguments:

sudo /opt/bitnami/ctlscript.sh restart
]]>
Set Up, Configure and Install FTP on AWS EC2 Instance – Bitnami LAMP ubuntu-14-04-lts/ Apache2 – vsftpd https://www.nickclaeboe.com/2017/06/27/set-configure-install-ftp-aws-ec2-instance-bitnami-lamp-ubuntu-14-04-lts-apache2-vsftpd/ Tue, 27 Jun 2017 01:02:42 +0000 http://www.nickclaeboe.com/?p=534 Set up new user to use FTP, use $ sudo passwd only to change the password later if needed, $ sudo adduser will prompt you to create a password then.

$ sudo adduser username
$ sudo passwd username

Use the command below to ensure your Ubuntu server and all apps/modules are up to date.

$ sudo apt-get dist-upgrade

If VSFTPD is already installed, use snippet below to remove it and purge the previous config files.

$ sudo apt-get remove --purge vsftpd

Install VSFTPD with snippet below.

$ sudo apt-get install vsftpd

Use snippet below to edit the vsftpd.conf file.

$ sudo nano /etc/vsftpd.conf

While editing the vsftpd.conf file, uncomment the directives below to make vsftpd ‘work’

local_enable=YES
write_enable=YES
chroot_local_user=YES

Add the following directive at the end of your vsftpd.conf file:

allow_writeable_chroot=YES

Once you’re finished editing your vsftpd.conf file, be sure to restart vsftpd with the following command:

$ sudo service vsftpd restart

Use the snippet below to change your access to ‘superuser’ so that you may ‘jail’ the ftp user to a certain directory.

$ sudo su

Use this snippet to tell vsftpd what directory you want to ‘jail’ the ftp user to.

$ usermod --home /opt/bitnami/apps/yourappname/htdocs/ username

Also, be sure to set up an inbound rule in your AWS EC2 instance to all ftp traffic.

TCP/IP Protocol Custom Range 20-21 0:0:0:0:/0

]]>
Accelerate Your Web Site Using Free Page Speed Test Tools https://www.nickclaeboe.com/2017/05/28/accelerate-web-site-using-free-pagespeed-test-tools/ Sun, 28 May 2017 14:34:25 +0000 http://www.nickclaeboe.com/?p=499

Your website’s page speed is of the utmost importance.

If your site doesn’t load fast enough, your potential customers and conversions are at risk. With our instant gratification culture of today, any page on your web site that takes more that 2 seconds to load fully will be abandoned immediately.

There can be a myriad of reasons that your site doesn’t load quickly. From not optimizing your images before uploading them, to improper server settings, your page load time can slow to a crawl. But, you’re in luck.

Below is a short list of my favorite resources for testing and addressing site page speed.

Free PageSpeed Test Tools:

GTMetrix.com

Pingdom.com

WebPageTest.org

Google Page Speed

Each of the page speed testing sites above will give you vital information on speeding up your website for optimal results. I use each of the urls above just a bit differently. GTMetrix is my favorite of the four. On your results page, they give you a breakdown of what’s causing your issues and give you guided hints on how to address and correct your page’s speed issues.

One of the biggest, and most common, page speed issues is Leverage Browser Caching (generally means that you can specify how long web browsers should keep images, CSS and JS stored locally).

Here is how to address Leverage Browser Caching on your site.  Add the following code to your .htaccess or httpd.conf file, dependent on your server type:

## EXPIRES CACHING ##
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/javascript "access 1 month"
ExpiresByType application/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 2 days"
## EXPIRES CACHING ##

Setting your leverage browser caching is one of several ways to improve your site’s page speed. A fast website will undoubtedly improve your visitor’s overall experience and catch those potential sales or conversions.

47% of consumers expect a web page to load in 2 seconds or less. (1)

PageSpeed Solution for WordPress Installations

I’ve also found this little gem for your WordPress blog or site. Speed Booster Pack WordPress Plugin address many, if not all, of your page speed issues for your WordPress installation.

Download the plugin for your WordPress site here.

Test, test, test and test some more to get your money making website to reach its fullest potential and as fast as possible. A slow site will kill your conversions and lose you potential sales and leads. Take the time to address every issue you possibly can related to page speed and show your website and visitors some love.

]]>
Get User Agent For Custom Browser Styles – PHP Get User Agent Variables https://www.nickclaeboe.com/2016/09/28/get-user-agent-custom-browser-styles-php-get-user-agent-variables/ Wed, 28 Sep 2016 11:36:29 +0000 http://www.nickclaeboe.com/?p=435

Often, I come across the need to pull the user agent from the browser to echo custom CSS styles for that specific browser. This comes in very handy when developing for mobile. Below is a list of the major user agent/browsers and the php call to get the user agent from the session.

Use the following code below to grad the user agent for you development needs.

/// get user agent for custom browser styles
function get_browser_name($user_agent)
{
if (strpos($user_agent, 'Opera') || strpos($user_agent, 'OPR/')) return 'Opera';
elseif (strpos($user_agent, 'Edge')) return 'Edge';
elseif (strpos($user_agent, 'Chrome')) return 'Chrome';
elseif (strpos($user_agent, 'Safari')) return 'Safari';
elseif (strpos($user_agent, 'Firefox')) return 'Firefox';
elseif (strpos($user_agent, 'MSIE') || strpos($user_agent, 'Trident/7')) return 'IE';

return 'Other';
}
?>

<style>
.IE #form form select {
width: 185px;
height: 26px;
margin-right: 5px;
margin-left: 9px;
padding: 0 0 0 15px;
font-size: 12px;
color: #666;
}
.IE input[type="text"]{
height:27px;
width: 185px;
margin-left: 8px;
/* margin-right: 8px; */
text-indent: 10px;
border: 1px solid #ccc;
}
.Firefox #form form select {
width: 159px !important;
height: 30px;
margin-right: 5px;
margin-left: 9px;
padding: 0 0 0 15px;
font-size: 12px;
color: #666;
}
.Chrome #form form select {
width: 190px;
height: 26px;
margin-right: 5px;
margin-left: 9px;
padding: 0 0 0 15px;
font-size: 12px;
color: #666;
}
.IE input::-ms-clear {
display:none;
}
</style>

<body class="<?php echo get_browser_name($_SERVER['HTTP_USER_AGENT']); ?>">

 

]]>
Set .HTACCESS File To Force NON-WWW SSL HTTPS https://www.nickclaeboe.com/2016/09/24/set-htaccess-file-force-non-www-ssl-https/ Sat, 24 Sep 2016 12:36:42 +0000 http://www.nickclaeboe.com/?p=427

I often come across sites that need SSL but require the path to be force with NON-www.

Below is a handy snipped of code to place in your root folder in the .htaccess file. You can simply copy this code and paste it in to force all incoming urls to drop www and only use non-www urls, e.g.: https://sitename.com.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)(.+) [OR]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^(www\.)?(.+)
RewriteRule ^ https://%2%{REQUEST_URI} [R=301,L]

]]>
GreenCloudVPS.com https://www.nickclaeboe.com/2014/07/06/greencloudvps-com/ Sun, 06 Jul 2014 11:34:51 +0000 http://dev.nickclaeboe.com/?p=172

I’m trying them out for my new VPS server. I’ve been cleaning up my servers lately and decided this course of action.

They have all kinds of payment plans. This particular server is a Windows Server. Their servers are located in the US and Canada. Their support is top notch. Here’s a peek at the specs.

Lots of good reviews and great prices for my needs.

https://greencloudvps.com/

]]>