我在这里不知所措。我认为这与我的 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 完全相同。知道为什么会这样吗?