简体   繁体   中英

Deploy SSL-enabled website to WHM-managed VPS

I've built a website (PHP5, HTML5, CSS3, node.js, MySQL 5) that works fine - it requires SSL - I coded it to reload users with https if they're not already using it. I have deployed this site successfully to many linux servers before - I know how to do that but - I need to deploy this to a VPS that has WHM on it.

I studied WHM. What i've done so far at a high level:

  • added an account for say xyz - with shell access
  • ssh/ftp into that account using the ip-address of the VPS
  • install code in /home/xyz/public_html with 755/644 permissions
  • built a custom php.ini in /home/xyz/public_html with needed settings
  • mysql -u root - set root password and added database/user xyz and grant all on xyz to user xyz
  • MySQL Workbench into the VPS using SSL user xyz - set up database xyz
  • pointed the xyz domain at the IP address of the VPS

The website works for http but for https all I get is 404 Not Found. I expect it's looking in the directory where WHM is installed for those assets. I cannot see the apache logs to confirm this.

From what I know about SSL you can only have 1 website on a server that uses SSL. WHM is the one website on this server that is already using SSL. This dawned on me - a duh moment when I got my first 404.

I've searched everywhere and found nothing - what i've managed to guess so far is that I will have to do this thru WHM - I need to:

  • add an IP-address in WHM - I see where to do that but do I just make one up? do I have to call GoDaddy and get them to give me one? or buy one?
  • move my xyz account to that IP address in WHM - I see where to do that
  • and then somehow get DNS servers to go to that IP instead of the IP of the VPS. This is where it gets over my head

I've searched for days and all I can find anywhere is tons of articles on installing SSL certificates. I'll get to that point eventually but for now I just want my website to work. Am I moving in the right direction?

I apologize for the long question I'm trying to demonstrate that I have researched this and tried everything I know. Thanks.

Usually, in a WHM server, the logs for a domain/s are located in the /usr/local/apache/domlogs directory. Check those. Generic error logs for Apache are in the /usr/local/apache/logs/ dir. With WHM you can install SSL certificates as much as you want. It has SNI enabled by default.

I cannot guess what your problem is without access, so you should start with your log files and go from there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM