mod_rewrite (not .htaccess) conf not loading

4pples

Member
Jan 25, 2021
18
0
1
Canada
cPanel Access Level
Root Administrator
Hi,

Using cpanel v92.0.10, CENTOS 7.9.

I’m having issues getting mod_rewrite to load my .conf. Can anyone please help me figure out how to debug this further to see where the issue is?

rewrite is enabled on apache2. The Include related to loading .conf (/etc/apache2/conf.d/userdata/ssl/2_4/domain/domain.com/.conf) is uncommented. There is a file at that location. I did a rebuild + restart. Still nothing.

I’ve also added LogLevel alert rewrite:trace8 to the /userdata conf and have a tail -f running on /var/log/apache2/error_log, reload the page in question and nothing appears in tail.

I've checked /usr/local/apache/domlogs, no luck.

Any ideas where one might look please?

Thank you
 

RoseHosting

Active Member
PartnerNOC
Jan 3, 2003
36
10
158
Seems that the correct directory is /std/ not /ssl/.
If you navigate your site in HTTP mode, then you need to edit the file under /std/, and in /ssl/ if you want it to work when navigating the site in HTTPS.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,280
2,433
363
cPanel Access Level
Root Administrator
Earlier you mentioned the std and ssl include files didn't seem to correspond to the secure and insecure access in the browser. If you had some details on how I could reproduce that I can do some testing on my end, and file a case with our developers if necessary.
 

4pples

Member
Jan 25, 2021
18
0
1
Canada
cPanel Access Level
Root Administrator
I'm running a pretty standard / new DigitalOcean droplet with the following:

cPanel & WHM® 82.0.15 on CentOS 7.6

cPanel has been upgraded to v92.0.11) and CENTOS to 7.9kvm

Doubt it makes a difference, but this is in SFO.

Let me know if I can provide any other details?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,280
2,433
363
cPanel Access Level
Root Administrator
Mostly I'd be interested in what you're placing in the include files and how you're testing those. If that isn't information you can post publicly you can open a ticket with our team and we can do more testing on that for you.
 

4pples

Member
Jan 25, 2021
18
0
1
Canada
cPanel Access Level
Root Administrator
In the end, it wasn't the include file at issue. It was apache (httpd.conf?) looking in the wrong place.

Meaning, for the vhost conf for the SSL version of my site, it was completely ignoring my Include directive (which was pointing to /ssl). And for the standard :80 vhost conf in the same file, THAT include directory _was_ working, both for http and https.

Does that make sense?