Support » Localhost Installs » WordPress not working behind apache proxy

  • Dear support,

    I have a problem with this error message:
    [04-Oct-2012 15:22:54 UTC] PHP Warning: require_once(./wp-load.php): failed to open stream: No such file or directory in admin.php on line 30
    [04-Oct-2012 15:22:54 UTC] PHP Fatal error: require_once(): Failed opening required ‘./wp-load.php’ (include_path=’.:/usr/local/lib/php:/usr/local/share/pear:/usr/local/share/GeoIP’) in admin.php on line 30

    I have this server configuration:
    1. main server with apache 2.2, which proxies the requests to point 2.
    2. jail with apache 2.2 and php 5.3

    Main server 1. has this vhost proxy configuration:
    <VirtualHost *:80>
    ServerName mywebsite.tld
    ServerAlias *.mywebsite.tld
    ProxyPass / http://192.168.1.99/ retry=0 keepalive=On
    ProxyPassReverse / http://192.168.1.99/ retry=0
    </VirtualHost>

    Jail server 2. has this vhost configuration:
    <VirtualHost *:80>
    ServerName mywebsite.tld
    ServerAlias http://www.mywebsite.tld
    DocumentRoot “/www/mywebsite.tld/”
    ErrorLog “/var/log/httpd/mywebsite.tld/_error.log”
    CustomLog “/var/log/httpd/mywebsite.tld/_access.log” combinedssl

    <IfModule php5_module>
    php_flag log_errors on
    php_value error_log “/var/log/httpd/mywebsite.tld/_error-php.log”
    php_admin_value error_log “/var/log/httpd/mywebsite.tld/_error-php.log”
    </IfModule>

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^www\.mywebsite\.tld [NC]
    RewriteCond %{HTTP_HOST} !^$
    RewriteRule ^/(.*) http://mywebsite.tld/$1 [R=301,L]
    </VirtualHost>

    When I move the whole vhost configuration from jail to the main server 1., it works just fine, no errors at all. Once I move the vhost configuration back to the jail server 2., I get the include_path error, when accessing the admin page. The main page works in jail without issues.

    The strange thing is, it does this only on wordpress installations. I am using different cms systems on other sites in the same jail and vhost configurations and these work just fine.

    Can you have a look why the includes in wordpress are somehow dirty?
    I would be very happy to fix this issue once and for all.

    Thanks in advance,
    Gabriel

  • The topic ‘WordPress not working behind apache proxy’ is closed to new replies.