Apache - Restrict to IP not working

后端 未结 3 854
小鲜肉
小鲜肉 2021-02-07 17:31

I\'ve a subdomain that I only want to be accessible internally; I\'m trying to achieve this in Apache by editing the VirtualHost block for that domain. Can anybody see where I\'

3条回答
  •  借酒劲吻你
    2021-02-07 17:56

    I suppose the path inside Directory tag should be simply /

    
      ServerName test.example.co.uk
      DocumentRoot /var/www/test
      ErrorLog /var/log/apache2/error_test_co_uk.log
      LogLevel warn
      CustomLog /var/log/apache2/access_test_co_uk.log combined
      
        Order allow,deny
        Allow from 192.168.10.0/24
        Allow from 127
      
    
    

    and please don't forgot to restart apache

提交回复
热议问题