Tren

Registered
Sep 21, 2020
2
0
1
US
cPanel Access Level
Root Administrator
Hello,

Hopefully someone is able to help me with this one. I apologize if this has been answered, but I have been unable to solve my problem with the solutions I have been able to find.

I have root access to a VPS, and am currently running
cPanel and WHM: 11.90.0.9
OS: CentOS 7.8

I have a website, but also a program called Rocketchat, which used to be able to be accessed by port 3000. After enabling AutoSSL, I was unable to access Rocketchat.
I want to be able to have AutoSSL and forced-HTTPS enabled for the website, but allow http traffic via port 3000.

Thus far I have downloaded CSF and opened the port for TCP_IN, TCP_OUT, UDP_IN, and UDP_OUT. I have also gone into Tweak Settings -> Redirection and turned the first option off.

I have verified that the program is running and listening on port 3000. However, when I attempt to access it it redirects me to the regular https website.
Any help would be greatly appreciated.
 

andrew.n

Well-Known Member
Jun 9, 2020
581
158
43
EU
cPanel Access Level
Root Administrator
My idea is that AutoSSL modified your .htaccess file where you had some specific rules for RocketChat. Have a look at that.
 

Tren

Registered
Sep 21, 2020
2
0
1
US
cPanel Access Level
Root Administrator
Hello Andrew,

Initially, I did not have to write a rule in the .htaccess file to access RocketChat. Here is the current file, site being replaces with 'example':
Code:
RewriteEngine on

RewriteOptions inherit

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php73” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php73 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

# BEGIN WordPress
# The directives (lines) between `BEGIN WordPress` and `END WordPress` are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.

# END WordPress

RewriteCond %{HTTP_REFERER} !^http://example.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://example.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.example.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.example.com$      [NC]
RewriteCond %{HTTP_REFERER} !^https://example.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://example.com$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.example.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.example.com$      [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]
 

andrew.n

Well-Known Member
Jun 9, 2020
581
158
43
EU
cPanel Access Level
Root Administrator
hmm can you see what is running on port 3000? You can do so with:

netstat -ntpln
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,266
313
Houston
I have verified that the program is running and listening on port 3000. However, when I attempt to access it it redirects me to the regular https website.
Any help would be greatly appreciated.
Is the site you're running a CMS? Could you have force redirected it to HTTPS within the CMS software itself? I don't see it added to the .htaccess and that would be one of the only other places it could be added. The last place would be an Apache include. The concern I'm seeing is that the application is being redirected to https, so it doesn't seem that the issue is a matter of the port not being open.