在 Apache 中设置反向代理服务器

在 Apache 中设置反向代理服务器

刚刚尝试在 Apache 中设置我的第一个反向代理服务器,如下所示:

/etc/httpd/conf/httpd.conf

    <VirtualHost *:80>
         ServerName www.domain.org.uk
         ServerAlias domain
         ErrorLog /var/log/httpd/domain-error_log
         TransferLog /var/log/httpd/domain-access_log
         ProxyPass / http://domain.org.uk:80/
         ProxyPassReverse / http://domain.org.uk:80/
    </VirtualHost>

but this fails with:

    XCache requires Zend Engine API version 220060519.
    The Zend Engine API version 220090626 which is installed, is newer.
    Contact mOo at http://xcache.lighttpd.net for a later version of XCache.

    Cannot load Zend Extension Manager - it was built with configuration 1.2.0, whereas running engine is API220090626,NTS
    PHP Warning:  PHP Startup: uploadprogress: Unable to initialize module
    Module compiled with module API=20060613
    PHP    compiled with module API=20090626
    These options need to match
     in Unknown on line 0
    XCache requires Zend Engine API version 220060519.
    The Zend Engine API version 220090626 which is installed, is newer.
    Contact mOo at http://xcache.lighttpd.net for a later version of XCache.

Is it something I have done wrong in the configuration?

Edit:
Spaces now removed as per Chris's suggestion.  Apache now starts up ok but reverse proxy doesn't seem to work.  Server can ping domain.org.uk but no page gets returned.  Also nothing shows in the ErrorLog or TransferLog.

Edit2:
Have changed the config a bit but still nothing working, any suggestions?
/etc/hosts

    xxx.xxx.xxx.xxx <domain>.org.uk

/etc/httpd/conf/httpd.conf

  <VirtualHost *:80>
    ProxyPreserveHost On
    ServerName www.domain.org.uk
    ServerAlias domain
    ProxyHTMLLogVerbose On
    LogLevel Info
    ErrorLog /var/log/httpd/domain-error_log
    TransferLog /var/log/httpd/domain-access_log
    <Location />
      ProxyPass http://domain.org.uk/
      ProxyPassReverse http://domain.org.uk/
      Order allow,deny
      Allow from all
    </Location>
  </VirtualHost>

答案1

下载最新版本的 xcache,然后按照其构建说明进行操作。查看http://xcache.lighttpd.net/wiki/InstallFromSource但请注意,由于您的 php.ini 中可能已经包含一些 xcache 行,如果您遵循所有这些说明,请检查 php.ini 末尾是否有重复的 xcache 行。

相关内容