Go Back   HostGator Peer Support Forums > HostGator Peer Support Forums > Linux VPS Support

Notices

Reply
 
Thread Tools
  #1  
Old 09-17-2009, 02:20 PM
GatorDaveC's Avatar
GatorDaveC GatorDaveC is offline
HostGator Staff
 
Join Date: Mar 2006
Location: Ontario, Canada
Posts: 937
Default VPS Knowledge base

We need your help adding content to the Linux VPS knowledge base. If you are able to write any articles that would be helpful for clients, you'll definitely get some brownie points.

To contribute, please post your article in this thread.

Contributions could be anything helpful (ie. tweaking a firewall, starting/stopping services at boot, installing RPM's or popular scripts, etc.).

The URL for the knowledge base, where the articles will end up is here: http://support.hostgator.com/categor...-vps-virtuozzo
Reply With Quote
  #2  
Old 09-17-2009, 07:10 PM
LitomoSilver LitomoSilver is offline
Baby Croc
 
Join Date: Jul 2009
Location: Amidst the Stars...
Posts: 93
Default Re: VPS Knowledge base

Sure. Mind if I place a placeholder here for my article? (I'll rewrite once I've gathered everything I learned about the VPS in my time of testing.)

I'll pull everything I've learned and the solutions from my tickets with HG and place them into a clear, concise article... at least, to the best of my abilities.
Reply With Quote
  #3  
Old 09-17-2009, 07:48 PM
GatorDaveC's Avatar
GatorDaveC GatorDaveC is offline
HostGator Staff
 
Join Date: Mar 2006
Location: Ontario, Canada
Posts: 937
Default Re: VPS Knowledge base

Sure thats fine with me
Reply With Quote
  #4  
Old 09-17-2009, 08:03 PM
LitomoSilver LitomoSilver is offline
Baby Croc
 
Join Date: Jul 2009
Location: Amidst the Stars...
Posts: 93
Default Re: VPS Knowledge base

Troubleshooting WHMCS issues on a VPS system

Written by LitomoSilver

Credit of resolving issue goes to Stephen P., Justin McZeal and Ford M.

Fixing an issue with WHMCS trying to connect with your VPS and creating accounts and other functions can always be hair-pulling, especially when you don't really know the cause and don't really know what to look for.

While I knew how to manage my own servers, that experience was based on Debian/Ubuntu servers. Even though I had excellent help from Hostgator, I was still learning my way around the VPS server and the yum management system. I've always preferred the apt-get management system.

But that's neither here nor there.

Note: This is an article based on the two possible issues that might be commonly happening. I don't know, but I sincerely hope this article helps everyone.

If you've been wondering why your WHMCS hasn't been able to connect to your VPS, and see errors, similar to:

This is an excerpt between myself and HostGator's Level 3 Tech Support I will be including small notes in the excerpts like the one below to indicate where I found the errors.

I need help getting the WHMCS and the VPS to work together.
I don't quite know how to fix this issue (Error found in WHMCS Admin backend, in Clients -> View/Search Clients and switching to Products/Services tab once on that screen. Then I created a test account on the VPS server and clicked Create and got the error): *Module Command Error* (Curl Error) connect() timed out! - code: 28 and I think the VPS needs cURL installed... and I'm pretty sure I got it installed.

However, again, I don't know how to get the two to work together and I'd
like to ask some of your Staff, if I remember correctly, who are WHMCS
gurus to look over the installation of WHMCS and the VPS to see if they
can spot anything that needs to be fixed? And if so, can those issues be fixed and the steps given to me so that if I encounter the same error again, I can fix it on my own?

Note: The VPS is on exampledomain.com with the IP: xxx.xxx.xxx.xxx and the password to the root account is: xxxxxxxxxxxxx WHMCS installation is on: http://exampledomain.com/examplearea with the username/password as: User: xxxxxxxxxx Password: xxxxxxxxxx I think that's about all the details needed to look into the issues... I think. If you need more, please don't hesitate to let me know.

Thanks again!


It was apparently all the clue they needed to figure out what the issue was. Justin McZeal gave the solution:

Hello,

I have allowed the whm/cpanel ports for incoming connections in the firewall on your VPS through /etc/firewall/INPUT. Please note that you cannot create an account with "test" as the username so try one of your other accounts or rename the username in WHMCS. Let us know if you have further issues.

(These were the troublesome port issues that needed to be allowed through from my Reseller account while I was trying to get WHMCS and VPS to work together, as given by Justin.)

2086, 2087, 2082, 2083

Best regards,
Justin McZeal
Hostgator.com Support
Level 1 Linux Administrator


But it wasn't entirely fixed. You'll want to ensure that cURL is installed and compiled into Apache/PHP (Correct me if I'm wrong here.), in EasyApache when you do the initial configuration for Apache, PHP, MySQL and other things.

If you're using CSF, like I am, you'll definitely need to make sure that you do these two things: 1) Add the IPs of the server that the WHMCS installation is on and ensure that it's placed in the CSF.ALLOW list. Secondly, you'll want to make sure the ports are open for the WHMCS's server to come through and interact with your VPS.

The third and final issue between the WHMCS and VPS refusing to work together was this:


One more additional thing you will need to make sure of on new vps/dedis is that the two options below in WHM > Tweak Settings> Security are left unchecked, as they were checked in the beginning.

** Only permit cpanel/whm/webmail to execute functions that have a referrer. This will help prevent XSRF attacks, but may break integration with other systems, login applications, and billing software.

Only permit cpanel/whm/webmail to execute functions that have a referrer that matches one of the domains/ip on this server. This will help prevent XSRF attacks, but may break integration with other systems, login applications, and billing software.


It makes sense, as the VPS's WHM kept asking to either make an exception or go back to the main screen prior to his disabling it for me.

The other issue when using WHMCS and the Network status screen. If you encountered issues where the VPS wasn't allowing the WHMCS server to query the VPS and get its status and uptime, as well as whatever other modifications you made to the status folder that WHMCS includes. If you encounter errors similar to the below, then the suggestions here should fix them, if not, you'll want to contact Hostgator.

Here they are: (I'd requested that they check the permissions, just in case I was fudging something, but they replied that it was fine. I was slightly irritated at Benjamin's suggestion in checking the coding of the file itself or check the permissions. He suggested that they install WHMCS for me, but at a cost of $25, but it did make sense, after I realized that he could not possibly know if I did or didn't have WHMCS installed and had tested the Status script, so I'll forgive him that. -grin-)


Again, Ford M. came to my rescue and pointed out the solution. I hadn't realized that my request to another Level 3 administrator in upgrading MySQL for me would come back to bite me in the butt.

Hello,

Was Apache, PHP, or MySQL recently upgraded? The error_logs appear to indicate that PHP is looking for a nonexistent version of libmysqlclient and if you just updated MySQL you'll need to also perform an EasyApache including "MySQL of the system" and recompile this and this shoudl correct theses issues :

[Wed Sep 16 11:20:59 2009] [error] [client 216.110.94.227] /usr/bin/php: /usr/lib64/libmysqlclient.so.15: version `libmysqlclient_15' not found (required by /usr/bin/php)

[Wed Sep 16 11:20:59 2009] [error] [client 216.110.94.227] Premature end of script headers: index.php

[Wed Sep 16 11:20:59 2009] [error] [client 216.110.94.227] File does not exist: /home/exampleuser/public_html/500.shtml

Please let us know if you have any further questions or concerns. Thank you.

Sincerely,
Ford M.
Level 3 Systems Administrator Supervisor
HostGator.com LLC / SeoHosting.com


After he pointed out the issue and offered a solution, I did the upgrade as per his suggestion and the Status issue immediately resolved itself after the EasyApache recompile as described earlier. Again, you'll encounter issues like the above if you didn't allow your Reseller account access to the VPS as mentioned earlier.

These are just my experiences thus far with WHMCS and the VPS. Again, I hope it sincerely helps everyone and is clear and concise. If you need clarification, please let me know and I'll be more than happy to edit as necessary to include the corrections and the like.

Fudge, I forgot about the inability to edit posts after you post them.
Reply With Quote
  #5  
Old 10-31-2009, 05:48 AM
david b west david b west is offline
Hatchling Croc
 
Join Date: Nov 2008
Posts: 3
Default Re: VPS Knowledge base

Don't forget the KISS principle...

While there are hundreds of factors to consider, polish, and tweak as you migrate to your VPS try to remember the Kiss principle of "Keep it simple Stupid".

By this i mean the little easy things that you do know about may be the answer to all of your problems. Migration from your original server to a VPS is a lot for your brain to handle if this is all new to you as it is to me.

Moving from one hostgator account to another can be as simple as pushing ONE button and letting cPanel do its magic.

OPEN UP WHM with your "root" access account

goto
Transfers
then goto
Copy an account from another server with account password


carefully fill in the 4 boxes and press "copy account"

**********
as if by magic, your domain from your other account, along with its account information, is transferred into your NEW VPS!

cool.....


and --- almost perfect.


here is where the almost comes into play. the one thing that it does not appear to transfer is "file permissions". For many files this won't matter. For some of your php files it will really matter....

If you are getting blank pages is 'some' of the pages in your site after the move, be sure and "check the permissions"....

this can be done thru the file manager in cPanel or an ftp program.....

I had some problems on one domain after modding the file via ftp. i then opened and closed the file via cPanel's file manager, and VOILA- all was well....


so, to keep it simple, don't start to worry about every possible option that the new VPS has to offer that "might" be causing blank pages until you have first checked the FILE PERMISSIONS...

cheers, and good luck,

david from LOTSoFISH.com
Reply With Quote
  #6  
Old 10-31-2009, 07:48 AM
rota919 rota919 is offline
Swamp Croc
 
Join Date: Jan 2007
Location: Armagh, Northern Ireland
Posts: 323
Default Re: VPS Knowledge base

Read these threads in the dedicated form to get you going.
Most of it is applicable to a VPS as well.

http://forums.hostgator.com/dedi-set...ds-t29834.html
http://forums.hostgator.com/so-you-j...ed-t26963.html
http://forums.hostgator.com/basic-ad...ds-t11103.html
__________________
Fred
Reply With Quote
  #7  
Old 05-23-2010, 08:45 PM
www.toao.net www.toao.net is offline
Hatchling Croc
 
Join Date: Feb 2010
Location: Ladner, BC
Posts: 15
Default Opening ports on HostGator's Custom Firewall

I couldn't find this information anywhere so decided to post it in this thread. Hopefully I have everything accurate; if not I will be delighted to make corrections.

By default, your VPS will come configured with HostGator's custom firewall. If you're not sure if yours is configured in this way, you can check for the existence of the file /usr/sbin/firewall .

Do not use the Firewall GUI in Parallels PowerPanel as this is not compatible with HostGator's custom firewall. Anything you do here won't actually affect the server. (Perhaps this Firewall GUI could be removed to avoid confusion.)

There is an easy technique to do the three most common things you will need to do with your firewall: open inbound ports, open outbound ports, and block rogue IP addresses. Simply log in to your VPS via SSH as root, and edit the following files as necessary:

/etc/firewall/INPUT - This file is used to allow specific inbound tcp/udp ports or port ranges. Specify ports one per line, and port ranges in the format xxx:yyy
/etc/firewall/OUTPUT - This file is used to allow specific outbound tcp/udp ports or port ranges.
/etc/firewall/GLOBAL_DROP - This file is used to globally block specific IP addresses or ranges.

Additionally, if the above does not do what you wish to accomplish, you may edit /etc/firewall/INCLUDE in which you may add any custom iptables rules. The reason for this is that the next step will flush all the rules. So, be sure to place custom rules here so that they will not be lost when you restart your firewall.

Once you have finished configuring the firewall to your liking, run the following command:

service firewall restart

This will flush all the firewall rules and rebuild the firewall based on your configuration. Now the firewall is ready for your use.

Reply With Quote
  #8  
Old 05-27-2010, 05:19 PM
jenolan's Avatar
jenolan jenolan is offline
Hatchling Croc
 
Join Date: Jan 2008
Posts: 33
Default Re: VPS Knowledge base

My rooting in colour post.

It is nice to know when you have root access to stop doing pesky things like 'rm -r /' and then saying noorty noorty words.

Larry
Reply With Quote
  #9  
Old 06-06-2010, 01:41 PM
chaloupe chaloupe is offline
King Croc
 
Join Date: Nov 2004
Location: Dieppe, New-Brunswick, Canada
Posts: 1,427
Default Re: VPS Knowledge base

Would the following post be helpful? It's about Creating a daily cron to update QuickInstall automatically.

http://forums.hostgator.com/showpost...68&postcount=7
__________________
Jean Boudreau - IT for local businesses
It's all about automation!
Any data backup of your company?

Reply With Quote
  #10  
Old 03-23-2011, 06:36 AM
Styler Styler is offline
Hatchling Croc
 
Join Date: Dec 2006
Posts: 27
Default Re: Opening ports on HostGator's Custom Firewall

Quote:
Originally Posted by www.toao.net View Post
I couldn't find this information anywhere so decided to post it in this thread. Hopefully I have everything accurate; if not I will be delighted to make corrections.

By default, your VPS will come configured with HostGator's custom firewall. If you're not sure if yours is configured in this way, you can check for the existence of the file /usr/sbin/firewall .

Do not use the Firewall GUI in Parallels PowerPanel as this is not compatible with HostGator's custom firewall. Anything you do here won't actually affect the server. (Perhaps this Firewall GUI could be removed to avoid confusion.)

There is an easy technique to do the three most common things you will need to do with your firewall: open inbound ports, open outbound ports, and block rogue IP addresses. Simply log in to your VPS via SSH as root, and edit the following files as necessary:

/etc/firewall/INPUT - This file is used to allow specific inbound tcp/udp ports or port ranges. Specify ports one per line, and port ranges in the format xxx:yyy
/etc/firewall/OUTPUT - This file is used to allow specific outbound tcp/udp ports or port ranges.
/etc/firewall/GLOBAL_DROP - This file is used to globally block specific IP addresses or ranges.

Additionally, if the above does not do what you wish to accomplish, you may edit /etc/firewall/INCLUDE in which you may add any custom iptables rules. The reason for this is that the next step will flush all the rules. So, be sure to place custom rules here so that they will not be lost when you restart your firewall.

Once you have finished configuring the firewall to your liking, run the following command:

service firewall restart

This will flush all the firewall rules and rebuild the firewall based on your configuration. Now the firewall is ready for your use.


I moved from reseller to a new VPS account.
I had enabled the firewall in Paralells before I read this.
The file /usr/sbin/firewall exists for me
Do I disable the firewall in Paralells, or can I leave it open and it wont matter.

Last edited by Styler; 03-23-2011 at 06:40 AM.
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New knowledge base software GatorRSimoes General Announcements 18 01-30-2011 02:33 AM
Knowledge Base Software promni Off-Topic 5 08-27-2008 05:05 AM
New Knowledge Base Please Test! GatorBen General Announcements 0 04-27-2005 03:43 PM

All times are GMT -5. The time now is 07:37 AM.