在Debian 8(在Ubuntu上使用ppa)上安装了php7.1之后,我设法恢复了正确的php7.1包。 不过,我相信我缺less了几个关键模块。
问题是,从php5升级之前工作正常的WordPress的网站失败,http错误500.是的,似乎WordPress支持php7.1。 虚拟服务器由virtualminpipe理。
我的apache2日志显示:
require_once(/home/example/public_html/wp-config.php): failed to open stream: Permission denied in /home/example/public_html/wp-load.php on line 37
现在,php文件正在下载到这个服务器上,而不是处理它们。
但是我没有改变权限,权限仍然是正确的。 用户和组是example.example。 在/ cat / passwd中,该用户存在。 其他网站似乎工作正常。 我已经安装了以下模块:
php7.1-curl php7.1-mbstring php7.1-mcrypt php7.1-mysql php7.1-xml php7.1-xmlrpc
这是wordpress文档中记载的依赖关系。
我应该补充说只有ssl版本不起作用。 http版本显示默认的apache页面。
我的虚拟主机configuration(这可能是因为它由virtualmin生成有点麻烦)。
<VirtualHost *:80> SuexecUserGroup "#1003" "#1003" ServerName example.com ServerAlias www.example.com ServerAlias webmail.example.com ServerAlias admin.example.com ServerAlias *.example.com DocumentRoot /home/example/public_html ErrorLog /var/log/virtualmin/example.com_error_log CustomLog /var/log/virtualmin/example.com_access_log combined ScriptAlias /cgi-bin/ /home/example/cgi-bin/ ScriptAlias /awstats/ /home/example/cgi-bin/ DirectoryIndex index.html index.htm index.php index.php4 index.php5 <Directory /home/example/public_html> Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch Require all granted AddType application/x-httpd-php .php AddHandler fcgid-script .php AddHandler fcgid-script .php5 AddHandler fcgid-script .php7.1 FCGIWrapper /home/example/fcgi-bin/php5.fcgi .php FCGIWrapper /home/example/fcgi-bin/php5.fcgi .php5 FCGIWrapper /home/example/fcgi-bin/php7.1.fcgi .php7.1 </Directory> <Directory /home/example/cgi-bin> allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch Require all granted </Directory> RewriteEngine on RewriteCond %{HTTP_HOST} =webmail.example.com RewriteRule ^(.*) https://example.com:20000/ [R] RewriteCond %{HTTP_HOST} =admin.example.com RewriteRule ^(.*) https://example.com:10000/ [R] RemoveHandler .php RemoveHandler .php5 RemoveHandler .php7.1 FcgidMaxRequestLen 1073741824 Alias /dav /home/example/public_html Alias /pipermail /var/lib/mailman/archives/public <Location /dav> DAV on AuthType Basic AuthName "example.com" AuthUserFile /home/example/etc/dav.digest.passwd Require valid-user ForceType text/plain Satisfy All RemoveHandler .php RemoveHandler .php5 RewriteEngine off </Location> <Files awstats.pl> AuthName "example.com statistics" AuthType Basic AuthUserFile /home/example/.awstats-htpasswd require valid-user </Files> RedirectMatch /cgi-bin/mailman/([^/\.]*)(.cgi)?(.*) https://example.com:10000/virtualmin-mailman/unauthenticated/$1.cgi$3 RedirectMatch /mailman/([^/\.]*)(.cgi)?(.*) https://example.com:10000/virtualmin-mailman/unauthenticated/$1.cgi$3 IPCCommTimeout 41 php_admin_value engine Off </VirtualHost> <VirtualHost 5.196.66.43:443> SuexecUserGroup "#1003" "#1003" ServerName example.com ServerAlias www.example.com ServerAlias webmail.example.com ServerAlias admin.example.com ServerAlias *.example.com DocumentRoot /home/example/public_html ErrorLog /var/log/virtualmin/example.com_error_log CustomLog /var/log/virtualmin/example.com_access_log combined ScriptAlias /cgi-bin/ /home/example/cgi-bin/ ScriptAlias /awstats/ /home/example/cgi-bin/ DirectoryIndex index.html index.htm index.php index.php4 index.php5 <Directory /home/example/public_html> Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch Require all granted AddType application/x-httpd-php .php AddHandler fcgid-script .php AddHandler fcgid-script .php5 AddHandler fcgid-script .php7.1 FCGIWrapper /home/example/fcgi-bin/php5.fcgi .php FCGIWrapper /home/example/fcgi-bin/php5.fcgi .php5 FCGIWrapper /home/example/fcgi-bin/php7.1.fcgi .php7.1 </Directory> <Directory /home/example/cgi-bin> allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch Require all granted </Directory> RewriteEngine on RewriteCond %{HTTP_HOST} =webmail.example.com RewriteRule ^(.*) https://example.com:20000/ [R] RewriteCond %{HTTP_HOST} =admin.example.com RewriteRule ^(.*) https://example.com:10000/ [R] RemoveHandler .php RemoveHandler .php5 RemoveHandler .php7.1 FcgidMaxRequestLen 1073741824 Alias /dav /home/example/public_html Alias /pipermail /var/lib/mailman/archives/public <Location /dav> DAV on AuthType Basic AuthName "example.com" AuthUserFile /home/example/etc/dav.digest.passwd Require valid-user ForceType text/plain Satisfy All RemoveHandler .php RemoveHandler .php5 RewriteEngine off </Location> <Files awstats.pl> AuthName "example.com statistics" AuthType Basic AuthUserFile /home/example/.awstats-htpasswd require valid-user </Files> RedirectMatch /cgi-bin/mailman/([^/\.]*)(.cgi)?(.*) https://example.com:10000/virtualmin-mailman/unauthenticated/$1.cgi$3 RedirectMatch /mailman/([^/\.]*)(.cgi)?(.*) https://example.com:10000/virtualmin-mailman/unauthenticated/$1.cgi$3 SSLEngine on SSLCertificateFile /home/example/ssl.cert SSLCertificateKeyFile /home/example/ssl.key IPCCommTimeout 41 SSLCACertificateFile /home/example/ssl.ca php_admin_value engine Off </VirtualHost>
请帮我find这个根源。 我试图删除php7.1线,但没有做任何事情。
.htaccess文件:
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_HOST} ^blog.example.com$ [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://blog.example.com/$1 [R,L] RewriteCond %{HTTP_HOST} ^supernova.example.com$ [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://supernova.example.com/$1 [R,L] RewriteCond %{HTTP_HOST} ^(.*)example.com$ [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://example.com/$1 [R,L] </IfModule> <ifModule mod_headers.c> Header set X-XSS-Protection "1; mode=block" Header always append X-Frame-Options SAMEORIGIN Header set X-Content-Type-Options: "nosniff” </ifModule> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # uploaded files RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule . index.php [L] Debian 8 apache2 php 7.1, and 5.6