首页 文章

Apache 默认代理

提问于
浏览
1

我有一个管理多个域的内部 Web 服务器(192.168.1.2)。现在我需要再添加一个 DMZ 服务器,充当反向代理(它是一个 Apache 2.2.3,带有 IP 192.168.1.3,还有一个带有静态互联网 IP 的接口)

我需要这个 Apache 服务器应该代理从互联网到我的内部 Web 服务器的任何域,除了一个域(this.example.com)

一种架构:

INTERNET->Apache Proxy->Internal Web server (default for any domain)
INTERNET->Apache Proxy->Differente Web Server (this.example.com)

我必须在此 Apache 代理上设置什么样的配置?我读了关于 Proxypass 和类似的字符串,但我不明白如何代理我的内部 Web 服务器的“默认”...

谢谢您的帮助

1 回答

  • 0

    这是在“默认值”,但域 this.example.com 不起作用...

    NameVirtualHost *:80
    <VirtualHost *:80>
        RewriteEngine     On
        RewriteRule       ^(.*)$        http://192.168.1.2$1  [P]
    </VirtualHost>
    
    <VirtualHost *:80>
        LogLevel warn
            ServerName this.example.com
        DocumentRoot /var/www/html
        <Directory />
            Options FollowSymLinks
            AllowOverride None
        </Directory>
        <Directory /var/www/html/>
            Options Indexes FollowSymLinks MultiViews
            #AllowOverride None
            AllowOverride All
            Order allow,deny
            allow from all
        </Directory>
    </VirtualHost>
    

相关问题