Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Implement Apache v2.4 Access Control in apache2.conf / httpd.conf NOT .htaccess

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
1 post • Page 1 of 1
Bestia
Posts: 2
Joined: Tue Jul 04, 2017 2:05 am

Implement Apache v2.4 Access Control in apache2.conf / httpd.conf NOT .htaccess
  • Quote

Post by Bestia » Sat Jul 21, 2018 7:52 am

On our site https://subdomain.example.com we want to only allow access via certain IP.

We edited :

/home/admin/conf/web/subdomain.example.com.apache2.ssl.conf

adding the following into the directory container for the site :
/home/admin/web/subdomain.example.com/public_html/

<RequireAll>
Require ip xxx.xxx.xxx.xxx
</RequireAll>

This approach and variations on it does not work.
...

By itself in the .htaccess, Require ip directive does work.

I ran :
apache2ctl -V | grep SERVER_CONFIG_FILE
and of course it returns /etc/apache2/apache2.conf

So, I suspect I will need to add a virtual host to the apache2.conf, but then why not do this in the domain specific VirtualHost confs?

apache2.conf also includes the conf.d dir and its config files - including vesta conf which loads the domain specific confs.

Can someone shed light on how to achieve domain specific access control in Apache 2.4 ?

Any clarifications and help would be appreciated.

...

I have read the docs here :
https://httpd.apache.org/docs/2.4/mod/m ... _host.html
https://httpd.apache.org/docs/2.4/howto/access.html
Top


Post Reply
  • Print view
1 post • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

cron

Login  •  Register

I forgot my password