Subdomin with custom port?
Hi Guys,
I would like to know if it's possible to have a subdomain with custom port for example
apitrack.domain.com:6002
currently in cPanel if I created the subdomain apitrack.domain.com I want to add custom port 6002 so it can only be access with a specific port.
Can I know if you already encounter and solve this kind of setup?
TIA
-
HI 1. First you have to open custom port in your server firewall 2. Install Mod Proxy In Easy Apache 4 3. Modify Apache configuration.This can easily be done inside of Web Host Manager -> Apache Configuration -> Include Editor: From here, you"re going to want to modify the Pre VirtualHost Include file with the following:it should look like as below ServerName sub.mydomain.com ProxyRequests Off Order deny,allow Allow from all ProxyPass / Order allow,deny Allow from all After change and update run following command via SSH /scripts/rebuildhttpdconf service httpd restart Regards 0 -
Thanks for those details, @HostNoc. I would like to mention that custom configurations like that aren't something we provide support for, but should work well with the Apache include system. 0 -
@HostNoc Thanks, the last issue which I'm not sure is on step 1 do you know any tutorial sites/videos on how to add a custom port in cPanel without CSF Firewall? 0 -
@eggybot21 - what port are you trying to add, and to what service? 0 -
I want add any available port for example 6002 or 6024, this will be attach for example to this sample subdomain but since this is a server settings and not totally sure about it and I might mess up the configuration. Thanks, 0 -
cPanel avoids adjusting the firewall as much as possible, but we do have instructions on how to do that here. Just choose the firewall you're working with and these steps will help: You can also install CSF if you want as that is free software and gives you the graphical option to manage the firewall inside WHM. 0 -
Thanks, I will try to install CSF and check if the port will work 0 -
@eggybot21 - it's important to remember that you can't directly edit the Apache configuration on a cPanel server, as those updates will be overwritten as part of the nightly updates, or whenever there is an update to that specific package. Please take a look at Advanced Apache Configuration | cPanel & WHM Documentation to see how you can create updates that will "stick" 0
Please sign in to leave a comment.
Comments
9 comments