Hi,

I have a fedora33 system with apache 2.4.46 and trying to set up a web
page that is only accessible to a select group of IPs defined in an
.htaccess file in the directory where the web page resides. How can I
do this?

I've read the apache htaccess howto and it really seems related only
to user authentication.

How can I move the RequireAny section into an htaccess file? This will
make it easier to make IP changes without having to reload apache.

Listen 192.168.1.11:443
<VirtualHost 192.168.1.11:443>
  ServerName noc.example.com

<Directory "/var/www/noc.example.com-443/html">
  AllowOverride all
  Options +ExecCGI

  <RequireAny>
     Require ip 192.168.1.
     Require ip 10.
  </RequireAny>

</Directory>
  AddHandler cgi-script .pl
  DirectoryIndex index.pl
  DocumentRoot /var/www/noc.example.com-443/html
  ErrorLog /var/www/noc.example.com-443/logs/error_log
  CustomLog /var/www/noc.example.com-443/logs/access_log timing

  SSLEngine on
  SSLCipherSuite PROFILE=SYSTEM
  SSLCertificateFile /etc/letsencrypt/cert.pem
  SSLCertificateKeyFile /etc/letsencrypt/privkey.pem
  SSLCertificateChainFile /etc/letsencrypt/fullchain.pem

</VirtualHost>
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to