PHP包含路径在https模式下失败

时间:2013-06-20 20:16:32

标签: php apache2

我在这里不知所措。我认为它与我的apache2虚拟主机配置有关,但我不确定。

我有2个域名。 domain1.com和domain2.com。它们指向同一目录(因为所使用的页面的90%对于两个站点都相同)。

现在我需要一个SSL设置(domain1.com)。我以为我做的一切都正确,但是当我尝试通过https://而不是http://来访问页面时,它会抛出 Failed opening required 'wsdl/DealerLookup.php' include_path='.:/var/www/domain2.com/includes:/usr/share/php') in /var/www/domain2.com/www/home.php on line 2

这是虚拟服务器设置。

<VirtualHost *:8081>
    ServerAdmin admins@domain2.com
    ServerName domain2.com
    ServerAlias domain1.com
    DocumentRoot /var/www/domain2.com/www
    <Directory /var/www/domain2.com/www>
            Options -Indexes +FollowSymLinks
            RewriteEngine On
            RewriteBase /
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d

            RewriteRule ^partner/([0-9a-zA-Z]*)$ index.php?rule=$1 [L]
            RewriteRule ^webinar/([0-9a-zA-Z]*)$ webinar.php?aid=$1 [L]
            RewriteRule ^membership/([0-9a-zA-Z]*)$ intro.php?aid=$1 [L]
            RewriteRule ^go/(0-9a-zA-Z*)$ cab.php [L]
            RewriteRule ^([0-9a-zA-Z]*)$ /index.php?aid=$1 [L]


    </Directory>

    ErrorLog /var/log/apache2/domain2/root/error.log
    TransferLog /var/log/apache2/domain2/root/access.log
    LogLevel warn
    RewriteEngine On
    RewriteLog "/var/log/apache2/domain2/root/rewrite.log"
    php_admin_value session.cookie_domain "domain2.com"
    php_admin_flag session.cookie_secure off
    php_admin_value open_basedir "/var/www/domain2.com/:/usr/share/php/"
    php_value include_path ".:/var/www/domain2.com/includes:/usr/share/php"
    php_admin_flag  file_uploads off
</VirtualHost>
<VirtualHost *:8443>
    SSLEngine On
    SSLCertificateFile "/opt/ssl/domain2/domain2.crt"
    SSLCertificateKeyFile "/opt/ssl/domain2/domain2.key"
    SSLCACertificateFile "/opt/ssl/domain2/gd_bundle.crt"
    ServerAdmin admins@domain2.com
    ServerName domain1.com
    DocumentRoot /var/www/domain2.com/www
    <Directory /var/www/domain2.com/www>
            Options -Indexes +FollowSymLinks
            RewriteEngine On
            RewriteBase /
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d

            RewriteRule ^partner/([0-9a-zA-Z]*)$ index.php?rule=$1 [L]
            RewriteRule ^webinar/([0-9a-zA-Z]*)$ webinar.php?aid=$1 [L]
            RewriteRule ^membership/([0-9a-zA-Z]*)$ intro.php?aid=$1 [L]
            RewriteRule ^go/(0-9a-zA-Z*)$ cab.php [L]
            RewriteRule ^([0-9a-zA-Z]*)$ /index.php?aid=$1 [L]


    </Directory>

    ErrorLog /var/log/apache2/domain2/root/error.log
    TransferLog /var/log/apache2/domain2/root/access.log
    LogLevel warn
    RewriteEngine On
    RewriteLog "/var/log/apache2/domain2/root/rewrite.log"
    php_admin_value session.cookie_domain "domain2.com"
    php_admin_flag session.cookie_secure off
    php_admin_value open_basedir "/var/www/domain2/:/usr/share/php/"
    php_value include_path ".:/var/www/domain2.com/includes:/usr/share/php"
    php_admin_flag  file_uploads off
</VirtualHost>

正如您所看到的,对于我的非ssl和ssl,include_path和open_basedir完全相同。知道为什么会这样吗?

0 个答案:

没有答案