Keyword

Optimum Server Setup for K2 Sites

  • Petar Elez
  • Petar Elez's Avatar Topic Author
  • Offline
  • Junior Member
More
8 years 1 month ago #152726 by Petar Elez
Optimum Server Setup for K2 Sites was created by Petar Elez
Hi All,

I am aware this is a very loaded question and most will say each person has different requirements, but at the same time I feel like most of us running on standard configurations offered by providers.

I've tried shared hosting with multiple providers as well as managed VPS and Cloud SSD by services like Servint. Increasing hardware resource obviously helps but server configuration seems to be the same and costs are adding up.

Looking to get more out of existing servers or even save money by migrating to either AWS or vultr.com. Not being a server side guy managing a server seems a bit daunting - can't figure out what's the best way to go - OS, Apache/Nginx, MySQL / MariaDB, Security modules, ModPageSpeed, Caching options, Engintron, etc...

I have even considered hiring someone to do this for me but I have yet to find a person that seems trustworthy or someone who appears to actually know what they're talking about (in terms of Joomla / k2 needs at least). Joomlaworks team has shared some tips on the server set up in the past so I figure this may be the best place to start.

Pretty sure a lot of people would appreciate actual real life examples and advice on how to create the right set up. .

What I am hoping is get some actionable input/guidance on setting up a solid server to run my Joomla/K2 sites on, or at least, get a conversation going...

What is the best way to set up a Secure and Performing server specifically for k2 sites?



.

Please Log in or Create an account to join the conversation.

  • Panagiotis Sakellariou
  • Panagiotis Sakellariou's Avatar
  • Offline
  • New Member
More
8 years 1 month ago - 8 years 1 month ago #152729 by Panagiotis Sakellariou
Replied by Panagiotis Sakellariou on topic Optimum Server Setup for K2 Sites
K2 doesn't have any specific needs. It is based, along with joomla, on PHP. As far as php goes, I've found that litespeed has the best php handler out there (LSAPI) which is a lot faster than anything else, and together with php 7 it can be amazingly fast!

Litespeed is commercial, and it is used instead of apache. The best thing is that it operates exactly like apache, so everything works as if you had apache (htaccess etc). In fact, in Cpanel you can switch from apache to litespeed and back, with one click and a couple of seconds wait time.

As for joomla specific security, I recommend admin tools the pro version (it has an awesome WAF = firewall), and for extra performance use Jotcache in combination with joomla global config cache. What you need to setup with the caches is this:

1.Jotcache ideally ALL pages
2.Exclude from jotcache any module positions that you need to be real time updated
3.Switch on conservative global caching of joomla which affects the caching of modules
4.Then go to each and every 1 of your modules and choose the time you want it to be recached. Keep in mind that if a module does not change its output from page to page, then it does not need to be cached on module level (switch off its caching option), instead it will be cached on page level by jotcache
5.If you exclude any module positions from jotcache's page cache, then go to the modules that you have assigned to these positions and enable their individual module caching with the recache time you need

Also, compress, minify and combine all of your css and js files. DO NOT use a plugin for this, the plugins will end up using a lot of "server juice" to do what you can do manually, and in many cases will serve the same code many many times to your clients, by using different filenames for the same code. Ideally you should be serving 1 css file and 1 js file to you clients ready to go. Record the css and js files you serve now, and hunt down the code that inserts them and remove that code (yes that means hacking core files. ALWAYS write down which core files you hack AND have a filename-Copy of the original file in the respective folder). Then insert you own files directly in your template's head file, and use this in order to add a timestamp to your css and js files (only), so that every time you change them, the changes will be visible to your clients. And lastly, if you use bootstrap , jquery , fontawesome etc etc do not use them as is, instead go to their respective "customize" pages and create your own versions with only the parts you actually use, thus reducing their size considerably. (for fontawesome I included a link to iconmoon which will generate fontawesome with different css classes, instead of fa fa- it uses something like ico ico- , so when you generate the files, don't forget to edit the css and change the classes to fa fa-. Also iconmoon does not generate .woff2 and .otf font files, instead go here and here to transform the ttf file to .otf and .woff2 and then add them in the css file of fontawesome )

Also, use K2's templating to create your own templates, and remove ALL code parts that you do not use. There's no point in making php check if you have "Show Media" enabled, if you do not use media. Every extra "if" is an extra millisecond that you can avoid, reducing TTFB (time to first byte)
Last edit: 8 years 1 month ago by Panagiotis Sakellariou.

Please Log in or Create an account to join the conversation.

  • Petar Elez
  • Petar Elez's Avatar Topic Author
  • Offline
  • Junior Member
More
8 years 1 month ago #152732 by Petar Elez
Replied by Petar Elez on topic Optimum Server Setup for K2 Sites
Thank you for your input Panagiotis... You make good points on CMS security and site / file optimization - some of these I am already implementing and some I haven't tried so thanks for sharing.

Server set up and management are my 2 focuses right now. I will look at LiteSpeed as I am not familiar with it.

Do you have any other input on the server set up and security?

.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 1 month ago #152746 by Krikor Boghossian
Replied by Krikor Boghossian on topic Optimum Server Setup for K2 Sites
Panagiotis is spot on his advice.
I am not really an expert in servers but the current stack I use is Nginx for webserver, Varnish for caching and no cPanel, mail servers etc installed on the web server.

If you want to hire someone to build you a solid webserver(s) setup, I think you should stick on a webserver and avoid installing Plesk, cPanel and other software which may hinder the performance.

As an OS I think Centos and Ubuntu will work fine.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Petar Elez
  • Petar Elez's Avatar Topic Author
  • Offline
  • Junior Member
More
8 years 1 month ago #152792 by Petar Elez
Replied by Petar Elez on topic Optimum Server Setup for K2 Sites
Would you recommend anyone (joomlaworks?) I can hire to set this up for me?

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 1 month ago #152812 by Krikor Boghossian
Replied by Krikor Boghossian on topic Optimum Server Setup for K2 Sites
You ask me If I would recommend the company I work for :)
Lets continue our discussion over an email:
www.joomlaworks.net/support/contact

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Petar Elez
  • Petar Elez's Avatar Topic Author
  • Offline
  • Junior Member
More
8 years 1 month ago #152817 by Petar Elez
Replied by Petar Elez on topic Optimum Server Setup for K2 Sites

Krikor wrote: You ask me If I would recommend the company I work for :)
Lets continue our discussion over an email:
www.joomlaworks.net/support/contact


Everything you guys put it out is super simple and just works :) I'm hoping same goes for server side.... Just wasn't sure if this is something you'd be interested in doing / have bandwidth ... Will email. Thanks.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 1 month ago #152840 by Krikor Boghossian
Replied by Krikor Boghossian on topic Optimum Server Setup for K2 Sites
Always happy to help.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum