首先关闭我的设置:
安装了完整 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 我想以某种方式阻止对 Intranet 站点的任何外部访问,但不完全确定如何执行此操作,希望有人能提供帮助?
这是我需要使用的东西吗?
<Directory "/var/www/web">
Options Indexes FollowSymLinks
Allow Override None
Order deny,alow
deny from all
allow list 192.168.1.0/24
</Directory>