Point subdomain to port on localhost with TLS/SSL?
Hello. I am on a Godaddy VPS with cPanel and WHM. The server is running Metabase at port 3000, and I am trying to get the server to serve it at perfectly. For this I have followed these steps:
1. Add the subdomain on Godaddy under the "Domain Management" option.
2. Install `mod_proxy` from EasyApache in WHM.
3. From WHM, under "Apache Configuration", edit the pre virtualhost global file and add the following content:
4. SSH into the server and run the following scripts to rebuild the httpd.conf and then restart httpd:
The problem is that I don't know how to incorporate the required certificate files in this setup. The SSL certificates are managed by cPanel and in httpd.conf they are sourced from
. This is how it is for the subdomains I have created from cPanel which point to different document roots inside the public_http folder. But I don't know how I would go about generating certificates for metabase.domain.tld since I haven't added it form cPanel. I hope I have given enough information. I am a bit clueless about TLS/SSL so any input is highly appreciated. Thanks very much for reading this.
ServerName metabase.domain.tld
ProxyRequests Off
Order deny,allow
Allow from all
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
Order allow,deny
Allow from all
4. SSH into the server and run the following scripts to rebuild the httpd.conf and then restart httpd:
$ /usr/local/cpanel/scripts/rebuildhttpdconf
$ /usr/local/cpanel/scripts/restartsrv_httpd
The problem is that I don't know how to incorporate the required certificate files in this setup. The SSL certificates are managed by cPanel and in httpd.conf they are sourced from
/var/cpanel/ssl/apache_tls/sub.domain.tld/combined. This is how it is for the subdomains I have created from cPanel which point to different document roots inside the public_http folder. But I don't know how I would go about generating certificates for metabase.domain.tld since I haven't added it form cPanel. I hope I have given enough information. I am a bit clueless about TLS/SSL so any input is highly appreciated. Thanks very much for reading this.
-
What I believe you want to modify instead is the VirtualHost include not the previrtualhost include - the documentation here should be helpful Modify Apache Virtual Hosts with Include Files | cPanel & WHM Documentation 0 -
What I believe you want to modify instead is the VirtualHost include not the previrtualhost include - the documentation here should be helpful "Manage AutoSSL" > Run checks to generate certificates for your new subdomain, 4. Follow the instructions of
0 -
A correction because I don't know how to edit posts. I put a placeholder page at `/home/cpanel_user/public_html/metabase/index.html` not `/home/cpanel_user/public_html/metabase/index.html` as mentioned in the previous post. 0 -
I'm really glad you were able to find the resolution for that! Thank you for updating the thread here as well. 0
Please sign in to leave a comment.
Comments
5 comments