首先关闭我的设置:
安装了完整LAMP的Ubuntu Server 11
我的/ etc / apache2 / sites-available / default
的示例NamevirtualHost *
<VirtualHost *>
ServerName www.web.com
ServerAlias www.web.com
ServerAdmin me.co.uk
DocumentRoot "/var/www/web"
DirectoryIndex index.php
Alias /pdf /var/www/web/pdf/Order_pdf
Alias /glass /var/www/web/pdf/Glass_order_pdf
ErrorLog "/var/www/logs/error.log"
CustomLog "/var/www/logs/access.log" combined
CustomLog "/var/www/logs/deflate.log" deflate
</VirtualHost>
<VirtualHost *>
ServerName www.intranet.com
ServerAlias www.intranet.com
ServerAdmin me.co.uk
DocumentRoot "/var/www/intranet"
DirectoryIndex Search.php
ErrorLog "/var/www/logs/error.log"
CustomLog "/var/www/logs/access.log" combined
CustomLog "/var/www/logs/deflate.log" deflate
</VirtualHost>
我有我的路由器转发端口80到我的服务器,它正确显示www.web.com我想以某种方式阻止任何外部访问内部网站点但不完全确定如何做到这一点,希望有人可以帮助?< / p>
这是我需要使用的吗?
<Directory "/var/www/web">
Options Indexes FollowSymLinks
Allow Override None
Order deny,alow
deny from all
allow list 192.168.1.0/24
</Directory>
答案 0 :(得分:0)
我确信这已在其他地方得到解答。无论如何,如果你想在你的内联网上使用IP检查,你可以这样做。
<Directory /var/www/intranet/>
Order allow,deny
Allow from 192.168.1.0/24
</Directory>