Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Htccess controlling 2 sites on the same server |
|
Author |
|
benoit
Joined: 30 Jan 2016 Posts: 2 Location: malta
|
Posted: Sat 30 Jan '16 13:47 Post subject: Htccess controlling 2 sites on the same server |
|
|
Hello,
I have 2 websites on the same dedicated server using WHM cpanels.
CENTOS 6.7 x86_64 standard WHM
Apache 2.4
Mod FastCGI v2.3.9 (More information)
Mod Security 2.9.0 (More information)
If I drop my deny ip code in the htaccess of Site A, it denies users to both website A and B but both sites have a totally different cpanel.
Now if I drop an htacces in Site B, it has no effects whatsoever on both sites.
In my httpd.conf I have this setup:
Code: |
<Directory "/">
AllowOverride All
Options ExecCGI FollowSymLinks IncludesNOEXEC Indexes SymLinksIfOwnerMatch
</Directory>
<Directory "/usr/local/apache/htdocs">
Options All
AllowOverride All
Require all granted
</Directory> |
I am not a Linux Guru at all so please let me know the type of detail you need to troubleshoot the problem as I am not sure about what I should show you here.
Thanks,
Ben |
|
Back to top |
|
benoit
Joined: 30 Jan 2016 Posts: 2 Location: malta
|
Posted: Wed 03 Feb '16 11:29 Post subject: |
|
|
ok I deleted the cpanel account and recreated it.
This time my htaccess works but only when I call the url via http, the htaccess deny from all has no effect of https.
Any idea why please?
Thanks |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Thu 04 Feb '16 16:59 Post subject: |
|
|
I think you have two vhosts. One for port 80 and one for https port 443. And I think only one is configured for htaccess. |
|
Back to top |
|
|
|
|
|
|