logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Htccess controlling 2 sites on the same server
Author
benoit



Joined: 30 Jan 2016
Posts: 2
Location: malta

PostPosted: Sat 30 Jan '16 13:47    Post subject: Htccess controlling 2 sites on the same server Reply with quote

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

PostPosted: Wed 03 Feb '16 11:29    Post subject: Reply with quote

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: 7304
Location: Germany, Next to Hamburg

PostPosted: Thu 04 Feb '16 16:59    Post subject: Reply with quote

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


Reply to topic   Topic: Htccess controlling 2 sites on the same server View previous topic :: View next topic
Post new topic   Forum Index -> Apache