[UPDATED]
Вставка
- Опубліковано 30 лип 2024
- In this video I will show you how to install, setup and configure CPANEL/WHM to host websites on AWS Lightsail
⌚ VIDEO TIMESTAMPS
00:00 - Intro & Tutorial Outline
01:15 - Create #CPANEL/#WHM Instance using Blueprint
02:05 - Create Static IP and Attach to Instance
02:47 - Reset root password & Start CPANEL Setup
03:50 - CPANEL Setup and Trial License Activation
04:37 - Verify License IP & Server IP
05:10 - License Activation Fix
07:16 - Finish Setup & Verify Server IP in #WebHost Manager Setup
08:47 - Turn off services
10:53 - Run Security Advisor Scan
11:41 - Enable Apache Jail
12:05 - Install ImunifyAV Anti-virus software
12:39 - Enable KernalCare Symlink Protection
13:22 - Update System Kernal and Reboot System
15:02 - Configure #MySQL to listen on local IP & Restart MySQL
17:00 - Disable root login for SSH and Restart #OpenSSH
18:15 - Install CSF Firewall
19:53 - Configure Firewall and Restart #CSF
23:00 - Enable #ModSecurity #OWASP Core Rule Set
23:48 - Setup Accounts for Websites
26:22 - Enable #WordPress One-click install via Site Software
29:50 - Wrap up
As always if you found this useful, like the video, Subscribe and most importantly share this with Others and ask them to subscribe!! Some of the links below are affiliate links that I get a small kickback if use them!
📹 ABOUT
Hi Everyone, welcome to my channel Mukesh's Techspace, if you are new here, I post tutorials on AWS, Azure, Lightsail, WordPress hosting and other easy to setup web hosting tools and services. I also post videos on WordPress Tips and Tricks for developers. So if you are interested in this type of content please subscribe to the channel.
👩🏫 LEARN FREE
Receive two one-year premium subscriptions for the price of one (a $360 value for $180): go.mukesh.me/skillshareholiday
📨 SEND YOUR NEWSLETTER EMAILS CHEAPER - go.mukesh.me/sendy
📷 MY GEAR
Easily Record, Edit video using Screencast-O-Matic! - go.mukesh.me/screenrecorder
🏷 TAGS
whm,cpanel,webhost,wordpress hosting,how to setup cpanel,whm installation on aws,web hosting,amazon web services cloud computing,amazon web services,wordpress hosting 2021,whmcs tutorial,aws tutorial,wordpress hosting tutorial,amazon web services tutorial for beginners,wordpress hosting review,web hosting vs wordpress hosting,amazon web services explained,cloud computing,install cpanel centos 7,install guide for whm in aws,aws cloud,install whm centos 7
PS: Some of the links above are affiliate links that I get a kickback from so use them if you can!. Your price does not change. - Навчання та стиль
Great tutorial here. It makes me feel secured setting it up after watching you show us how to secure WHM/cPanel. Thanks much!
Great to hear!
Well explained and extremely helpful tutorial. I don’t know what I would have done without you. Thank you so much.
You're very welcome! Thanks for the comment!
Quality, Quality, Quality... thank you for an extremely helpful and well presented video.
You're very welcome!
I have used both the original and updated version to host software that uses php to run a shopping cart. Following the tutorial and using options from both videos made this loads easier. Thank you very much for your time and help Mukesh.
I wanted to add that if you are running a database on RDS and using an EC2 instance to connect to it you will need to go into firewall configuration and add port 3306 at the end of TCP_IN and TCP_OUT like so
TCP_IN = 20,21,22,25,53,80,110,143,443,465,587,993,995,2077,2078,2079,2080,2082,2083,2086,2087,2095,2096,8443,3306
TCP_OUT = 20,21,22,25,37,43,53,80,110,113,443,587,873,993,995,2086,2087,2089,2703,3306
A second hint of you are trying to use RDS/EC2 for a database is that you make sure Lightsail and RDS/EC2 are in the same zone. I had US-EAST-2 EAST OHIO for one and US-EAST-1 N.ARIZONA for my Lightsail but when i went to account/advanced under Lightsail to Enable VPC Peering my database wouldn't talk to Lightsail etc. so I had to rebuild the whole thing.
Thanks for the comments and info!
You've earned yourself a new fan my friend. Thanks alot for the help
Awesome, thank you!
Tutorial Steps found at: www.webhostingforbeginners.net/setup-and-secure-cpanel-whm-on-aws-lightsail/. Like, Share and Subscribe for more tutorials.
Thank you for the great video!!! really scratching my back! Quick question: Is it possible to install load balancer and cloudfront (distribution) with this setup too?
For Load Balancer you would need two cPanel instances setup as a cluster I think. I haven't tried to use cloudfront with Cpanel/WHM, but I did make this video ua-cam.com/video/ylyQPzQqWw8/v-deo.html see if it helps.
very good video
Please keep adding more videos like this
Thanks for the comment!
your tutorial is good only one thing is missing it's if you had also mentioned the keyboard buttons your using to save the terminal edits your making.
Yup I realized that and so I have made a video that walks through basic commands I use; here you go: ua-cam.com/video/WI8HiuMmouo/v-deo.html hope that helps! thanks.
WOW
love for u, helped me!!!
Glad to hear that. Should you like to leave a tip - I have the UA-cam Super Thanks enabled for my channel! Thanks!
Awesome Tutorial. Can you make a tutorial on how to migrate a cPanel from a different host into the Newly created WHM instance on Amazon and do all the configuration. That will be very helpful as i really need that. I have followed this tutorial and have it all setup. Now i want to bring my cPanel settings and multiple website from my previous host to my Amazon one. Thanks
Cpanel provides migration process, maybe that will help you.
Thank you so much. Please, how do I make create a custom domain name for the cpanel instead of using IP address?
I also want it to have the padlock 🔒 icon showing it's secure.
Hello there,
Thanks for this tutorial.
I'm having an issue with the reboot system "Graceful server reboot" is taking much more time to reboot. I've been trying this since yesterday and I'm still on it but it's not done.
Thank you very much for your series on AWS LightSail. Extremely useful. I do have a couple of questions. First, in your first video you said that the advantage of AWS Lightsail is that we don't have to worry about security anymore, but in this video you actually configure security and firewall in cpanel. So what do you mean by not have to take care of configuration, security and updates with AWS LightSail? My 2nd question is that now, I have WordPress Toolkit which appeared at the bottom of my cpanel, and I have not paid for it. I read that it is now part of the recent versions of cpanel. It is super useful to set up a new WordPress site, and it even allows to have it password-protected. I am considering changing hosting to go to AWS LightSail, so I'd like to confirm that I will truly have access to this great tool kit in cpanel with AWS LightSail.
Hi thanks for the comments. So there are multiple layers of security and Lightsail as a platform provides the infrastructure level security and up to some extent the OS level security. Then there is application level security which is what most of the new video covers. There are even security steps down at the WordPress level which I cover in other videos on my channel. Hope that helps. I have not seen the WordPress Toolkit but seems like it is a cPanel specific feature. Here is some info on it: cpanel.net/wp-toolkit/. Seems pretty neat and I may do a video on it once I'm familiar. I would certainly recommend Lightsail for hosting WordPress. Hope that helps.
@@MukeshsTechSpace Thanks! Suggestion: when you connect with SSH (coding in black box), would you be able to zoom in and slow down a bit? That is the unknown and scary part of setting up my server!
I will try to zoom more. Thanks for the suggestion! I also have the commands on the website www.webhostingforbeginners.net if that helps.
thank you for this great effort, how did you go row down at the last row (ssh) so we can add the bind-address=127.0.0.1 at a new line, what keys you have used on keyboard to do that, second , what keys on keyboard you have used after editng PermitRootLogin no ... to active and save the changes , Thank you
Thanks. Please see this video if it answers your questions: ua-cam.com/video/WI8HiuMmouo/v-deo.html
Great video and very informative. Any video plans for cPanel DNSOnly and DNS Clustering?
Thanks for the comments! No plans on that topic.
Hi thanks for your video , very useful. But I was wondering if you can set this up for a Wordpress lightsail instance?
I have some videos on WordPress lightsail, you may want to check out. Good luck!
excellent video! may I know if there is a way to setup lightsail CDN for wordpress websites hosted with cPanel running on lightsail instance?
Here is my video tutorial that may guide you: ua-cam.com/video/ylyQPzQqWw8/v-deo.html
MAN U ARE AWESOME! if u have a course let me know THANKKK U A LOT
Thanks for the comment!
Do you also have a tutorial of setting up a regular cpanel or control panel instance and then doing a manual wordpress install or a complete wordpress and database migration from another host?
I don't have that exact tutorial. But I have tutorials on moving WordPress sites in different videos. But essentially you use a migration plugin that will do it for you like all-in-one migration.
Hello Mukesh, Being able to configure a server thanks to this video, when I have zero prior knowledge is amazing, so thanks so, so much. I struggled with some basic things however: I did not know how to "save" in SSH connection, and the graceful server reboot never showed that it was completed. I found answers when Googling (not easy). Three questions remain: I cannot add the kernelcare patch (goes in loop and security advisor warning doesn't disappear). I read that it may be because there is only one free patch for an IP. I already added the patch for a static IP and then recreated an instance with the same IP. Are you aware of the problem? Is it easy for me to change the IP of the server? The 2nd question is the server size. With cpanel, if my websites need 40GB space + backup, it seems that the $20 80GB could be too small. What is your opinion? The 3rd question is "why do you kill SpamAssassin?" Thanks in advance for your replies.
Hi thanks for the comments. SSH is basically remoting into the server, so you'll need some basic Unix/Linux knowledge. In my videos I use 'vi' editor for changing files, and the save is !wq. Google 'vi editor' for common commands. Getting a new Lightsail Static IP is easy but Cpanel/Linux embeds the IP so that can be tricky to change but this shows how to(forums.cpanel.net/threads/how-to-change-the-private-ip-of-a-server.661821/) . It may be easier to create a new instance with a new IP. Sizing is very dependent on the type of sites, you can start with one size and always move up using snapshots feature. I believe SpamAssassin runs for your mail server, and since I turn off mail server I don't need that service.
Amazing tutorial, but please I need your help.
I followed your steps, finished setting up my Wordpress on cpanel. But when I try to access the admin login. I get the 404 redirect error.
I’ve done everything to change that from deleting the htaccess file and downloading a new version to everything else I know. Still having the same issue.
Can you please help me. I’m frustrated already. 🤦🏾♂️
Excellent video.
Could you help me solve the FTP access problem?
What needs to be done to make the connection possible?
Check ports...FTP is port 21 and needs to be open in Lightsail and Cpanel.
Also, do you recommend activating snapshots when creating the C-panel instance? Thanks
Yes, it can be one of the backup options.
Hi Mukesh, thanks for the video! I would like to know what is the difference on installing Wordpress via cPanel/WHM and using Wordpress Blueprint. Which one do you recommend more?
The blueprint is intended for single instance of WordPress. Cpanel/WHM will allow multiple.
@@MukeshsTechSpace I see! Got it. I facing issue on upgrading PHP when I using Wordpress Blueprint. Will the same happen same if I were to use Cpanel/WHM? Thanks!
There isn't a way to upgrade the WordPress blueprint by Bitnami. Check out this video: ua-cam.com/video/4Ec5nU-N6jw/v-deo.html. Yes you should be able to upgrade PHP on Cpanel/WHM - you may need to consult with CPanel or sysadmin. Backup before you do so. good luck
Hi Mukesh, thanks for the video, I have followed the video exactly and setup and WHM and migrated an existing cPanel account under this. The issue I am facing is that incoming emails are working fine, but outgoing emails does not go through and send a delivery report instead stating " retry timeout exceeded", any inputs how can I resolve this?
You may need to check networking section for firewall Ports in Lightsail Dashboard or DNS might be an issue I would guess.
Hiya Mukesh, how are you? Thanks for this tutorial, really helpful. Wondered if you could help, on my lightsail wordpress instance, in my dashboard I am getting the following message -0 "A definition of a siteurl or homeurl was detected in your wp-config.php, but the file is not writable.
Set your wp-config.php to writable and reload this page."..need to make it writable, can I connect to the '.htaccess or wp-config.php file' with SSH or do I need to use FTP (PuTty)? Thanks
You'll likely need to change permission of the wp-config. Try using the 'chmod' command to make the files writable. see this: docs.bitnami.com/aws/how-to/troubleshoot-wordpress-issues/#permissions-and-ownership
Hey Mukesh - After the kernel update and reboot, the instance became totally unreachable. I could neither ssh nor access the landing page, tried rebooting few times, the Lightsail firewall ports seem to be fine too...but before rebooting I noticed 'SSH direct boot login' was already enabled (green) somehow...I guess I should have created a non-root user before disabling SSH root login...did you miss to mention something or did I ? The instance is not even pinging (even after enabling ICMP) on lightsail...I am having to rebuild the Instance now...
Hi, not sure what could have happened in your case. I didn't come across it however it could be firewall (not lightsail firewall) related, but the fact the even port 80 is unreachable is concerning. Rebuilding is probably easier than continuing to troubleshoot if this is a new instance.
Great tutorial, congratulations.
I have a doubt, does lightsail with Cpanel need distribution?
Thanks for the comment! Distributions is needed by the website to cache static assets.
@@MukeshsTechSpace hey buddy, thanks for the quick reply, I got it, the thing is that I just created a new server and I want to migrate my pages to the new server but I get an error, "ssl has not received any response from the web".
I'm not certain what is causing that error. If you are migrating from cpanel to cpanel then they have a backup and restore feature per account level.
@@MukeshsTechSpace Thank you for answering, luckily I fixed it, it was 6 long hours with the cpanel support staff.
Thanks for the tip, I will migrate all my clients to the new server right now.
Glad to know you have the issue fixed
Great tutorial. May I ask what PHP version is available to use with this instance? Is there PHP 7.3 or higher? I'm planning to deploy a website with codeigniter 4 framework and it requires PHP 7.3 or higher. Thank you
Not sure, but probably AWS or CPANEL uses the latest version in their images. You can check quickly by deploying an instance and destroying once you know. Also you can use EasyApache4 to upgrade/downgrade PHP.
@@MukeshsTechSpace Thank you for your reply. Will I not be charged for creating an instance? Sorry, I am new to AWS.
AWS and many cloud computing services only charge compute by the hour. So you only pay for the time you have it running.
@@MukeshsTechSpace I see. Thank you for answering. The tutorial was great by the way. It helped me a lot.
Glad it helped!
Thanks, Mukesh. Excellent as usual.
1. Can you walk us through applying an SSL certificate in cPanel? Specifically, a WordPress site generated in cPanel? Maybe Let's Encrypt or Zero SSL.
2. How to add Let’s Encrypt, or ZeroSSL as an addon to CP. Found this docs.cpanel.net/knowledge-base/third-party/the-lets-encrypt-plugin/
3. How to setup staging server or subdomain for pre-production work and how to secure it with the same SSL method.
Grateful that PiP has been minimized. Less distracting.
Thanks for the comments.
I think I have covered AutoSSL in the first cPanel video. Cpanel comes with its own Free SSL system but the link you have also enables Let's Encrypt as an alternative. I may cover a staging site setup in a future video; but there are plugins that can do that for you, most are paid plugins however.
My installation is exactly the same as shown in the video, but now I need to correctly point the DNS. Do you have a tutorial for that?
Every DNS management is different so I may not have exact however you can check this video: ua-cam.com/video/RnICa8ywJZQ/v-deo.html
very very very good, thank you. can you have another video if i want to manage mameserver in my sevrer
Thanks for the comment. I don't recommend running own nameserver for reasons that I've discussed in videos. I would recommend Route 53 or Lightsail Zones for better reliability.
@@MukeshsTechSpace I am not using AWS instances, I am using my own dedicated server, my concern, my customer buy domain using my whmcs with anime, so he may need to manage domains, what do you suggest me to do?
At TURN OFF SERVICES chapter you turned off the spam filter, but did not go to Tweak Settings as it says to do.
Thanks for that info; good catch.
Hi Mukesh. I need to enable Webmail on my Lightsail server. Do you have a video on how to properly setup email on WHM on Lightsail?
Sorry I don't; I usually prefer to have email hosted by external dedicated services. I have other email setup tutorials here is the playlist: ua-cam.com/play/PLPZg3ICXf7g7NDl1dix6nykkqL6OfTTDf.html
I also have AWS SES series here: ua-cam.com/play/PLPZg3ICXf7g5xeI0LwC-dVu71Gi1p71QO.html
Great. Thanks I was actually looking at SES when you I got your message.
How use WHMCS on AWS to Sell and manage domain names. In this case the TLD ( eg: .com and .org etc). on which the domain are going to be sold are NOT part of the ICCAN managed ones like .com or .org. Instead the TLD is a handshake HNS TLD.
I'm not sure but good luck to you.
Do you have a tutorial on how to set up the email on lightsail, Im having error on DKIM and SPF?
I have multiple tutorials, please check the channel playlists.
Hello sir, what would be the Name server to point new account that is added to WHM?
is it the same value mentioned in "Nameserver Record Report"?, but it did not worked for me.
In the tutorial I suggest to keep the nameserver with your DNS hosting provider/Domain registrar. Or you can switch DNS hosting to something like Cloudflare. You will need to configure a Nameserver on the WHM server if you want to manage DNS there. Hope that helps.
@@MukeshsTechSpace Thank you for reply. If I have to give control panel to my customer, I should be able to provide them a custom name server. Do you have any video tutorial to configure Name server?
Sorry no I don't have a tutorial on name server setup.
Hi, me again.
I saw that you comment about corporate mails, I also already saw your videos about AWS SES, but I wanted to ask you what is the best option for the mails of the whole whm account, that is to say a single configuration and that all Cpanel users have no problems sending mails.
Do you have any article about it?
No I don't. you need to host and configure the mail servers with WHM/Cpanel so that each account / domains gets email services. You would need to have good knowledge of hosting email services and protecting it.
@@MukeshsTechSpace Thank you for your reply,
I am fortunately already testing and so far it is going well.
I just found CPanel University to see some courses.
Pd. your videos are great
Thanks for the comment!
please how i can i get leads for payroll
@6:37 Do we really need cpanel account?or we can bypass creating account by just subscribe cpanel license from aws marketplace?
I believe you need an account. AWS doesn't provide a license to my knowledge. You may need to contact support to find out.
Thank you for this video Mukesh, Just one thing you didn't cover is if the domain is hosted with rout53, what is the right way to connect the domain with the WHM, I did all steps but still having a problem with the name server. Also how to replace the IP address with own domain (host Name) and how that works with the name server. Thank you
Typically I you just point our DNS A record to the IP of the WHM; keeping your Nameservers hosted by your domain registrar. I did not include steps to setup Nameserver, since I like to and recommend to keep the Nameserver separate for reasons I've mentioned in the video. Good luck!
@@MukeshsTechSpace Thank till today i am not able to use email server still getting PRT error and emeils never worked, can you help?
Sorry I can't debug and troubleshoot specific issues through these comments. If you have a WHM license, their support team may be able to help you. If you would like me to consultation/advise drop me an email.
@@MukeshsTechSpace Yes please send me un email, cPanel they said its Amazon and amazon support as usual going no where
Hello Mukesh, I had a huge problem. I failed to login, just at a password-protected WordPress site level, and I was locked out the whole server. It was due to one of the settings of configserver (I followed your instructions) and the cpanel support team told me that it is uncommon to configure configserver in this way, where you get locked out the entire server. Could you point to the configuration that should be different from your instructions, so that this is not the case? It will be helpful to me but to others as well, I am sure. Thanks in advance.
I'm not sure of the exact configuration however I looked up some posts that may help. According to them it is likely the CPHulk Brute-Force Protection or CSF that has blocked your IP. To get back into the server they say to have your home computer get a new IP either through rebooting your modem or using a cellphone hotspot. Maybe Cpanel support or ConfigServer support can help remotely logging into it. The articles also describe how to disable these services or configure the number to be higher so it is not triggered easily. Maybe a topic for a future tutorial for me. Thank you! Here are the links:
forums.cpanel.net/threads/what-will-you-do-if-you-locked-out-yourself-from-whm-cpanel.423462/
forums.cpanel.net/threads/locked-out-from-server.620291/
www.atlantic.net/vps-hosting/how-to-locked-cpanel-whm-via-cphulk/
www.vpsblocks.com.au/support/Knowledgebase/Article/View/73/11/locked-out-of-cpanel-vps
blog.turnkeyinternet.net/web_hosting/locked-out-of-cpanel-again-locked-out-of-your-web-site/
docs.cpanel.net/knowledge-base/general-systems-administration/how-to-configure-your-firewall-for-cpanel-services/86/
blog.cpanel.com/advanced-server-security/
Great video. I need to set up a domain as a DNS to delegate client's websites, such as "ns1.mydomain.com", ns2, etc . How would I do that?
You may find this useful: docs.cpanel.net/knowledge-base/dns/how-to-set-up-nameservers-in-a-cpanel-environment/
Hey, How can i change the PTR(Reverse DNS) for lightsail static IP ?
I am not sure about it.
Hello Mukesh, Kindly advise which firewall settings affect accessibility to our server. we can access cPanel from Mobile hotspot only.
It seems your IP is blocked by the firewall in cpanel. You can logon using another IP and clear the blocks.
@@MukeshsTechSpace There is no blocked IP. I tried from different IP and different ISP same issue. Only work on Mobile or Hotsopt from mobile
unfortunately I don’t know what the exact issue can be. You probably need to contact support
@@MukeshsTechSpace could it be caused by firewall configurations
it says i have to become root to finsih security advisories i am logged in as root but it still won't let me please help
Hi there, not sure what could be the problem. WHM support may be better team to help
Hi Mukesh, Please share tutorial for set up cpanel email configuration with demo..(using AWS DNS Hosted Zone)
I would suggest you look at hosting email outside of cpanel.
@@MukeshsTechSpace can you tell me cons of cpanel email…actually I don’t have much budget for outside email provider…if possible please help to share video of cpanel email setup with aws dns zone
In my opinion, having email external to your server has reliability benefits, better reputation, reduced management of mail server and securing the mail server. Also if your server goes offline, then email is also impacted. Check out my video tutorials on email setup, I have few options that are low cost or even free. Good luck.
Obrigado
You are welcome
How I uninstall WordPress themes through lightsail wordpress instance.
You can delete Themes from the WP Admin.
you saved my ass
Hi Mukesh, I have followed all step today but there is also one step in Security Advisor, which is not shown by you in the video...can you help me to resolve that point? here is the point: ""Recommendations
/etc/shadow has non default permissions. Expected: 0200 0600, Actual: 0000.
Review the permissions on /etc/shadow to ensure they are safe"
I've not run across that one, sorry. Seems like the file may not have right permission. Try to Google it.
You have to pay for each instance ?
Yes Lightsail has paid instance plans. You need a cpanel license and cpanel accounts are included. Hope that helps
My domain hosting use lightsail now require subdomain how to creat it when hosting in lightsail
Sorry I'm not sure I understand your question.
@@MukeshsTechSpace explain i have domain mukesh.com domain at hosting domain provider now host aws lightsail with DNS support was nameserver update provide lightsail to hostinger now mukesh.com working but now want another domain inside this domain like:- support.mukesh.com how I will do subdomain also subdomain will SSL certification now thanks for the reply and good video tutorial.
Create subdomain just like main domain. Point DNS of subdomain to same IP and then create new Account in WHM.
Why is my domain not connecting to server
Not sure. DNS is a good place to start debugging.
Video On How To Install Varnish On Light Sail.....
Will try, thanks for the suggestion!
how to save at last..................its like :"wq"
Yes. save is :wq (w means write)
sir can we host it on S3?
You won't be able to host applications on S3. You need either Lightsail or EC2 compute services to host applications.
@@MukeshsTechSpace yes... but sir if we are getting only 60gb per instance how can we offer storage to our clients.. like we offer 10gb then our storage will exceeds its limit in only 6 customers...how can we tackle this
With Lightsail you have to upgrade to the next tier of Instance to get more local storage. You can attach additional storage to an instance: lightsail.aws.amazon.com/ls/docs/en_us/articles/elastic-block-storage-and-ssd-disks-in-amazon-lightsail
I already sent you email. please reply me asap, I need to setup whmcs on aws lightsail
Thanks
I upgraded my instance whm, then I got this error cgi-sys/defaultwebpage.cgi when opening my website url. any idea how to resolve this. TIA
Hi sorry you're running into issues. There could be multiple reasons and without debugging hard to say. I would suggest opening a ticket with WHM.
@@MukeshsTechSpace Thank you
Hi, I had the same issue, did you ever manage to find a solution for this?