最近我改变了我的networking服务器从cpanel和CENTOS 7,使用nginx与一个名为nDeploy scipt,这与wordpress和托pipe在我的服务器上的网站很好。 我有这个脚本不工作。 由于nginxconfiguration,我的网站正在使用一个主要的index.php访问大多数网页,一些PHP模板解决scheme,但我只得到这个错误: "500 too many redirects" 所以这里是我的.htaccess(当我使用Apache,这使得伎俩): Options +FollowSymLinks RewriteEngine On RewriteRule ^([^/]*)\.php$ index.php?page=$1 [L,QSA] 这是我的nginx conf文件: # Downloads rewrite ^/downloads/([0-9]+)/([^/]*)$ /./downloads.php?action=displaycat&catid=$1 last; rewrite ^/downloads$ /./downloads.php last; #Knowledgebase rewrite ^/knowledgebase/([0-9]+)/[a-zA-Z0-9-]+\.html$ /./knowledgebase.php?action=displayarticle&id=$1 last; rewrite ^/knowledgebase/([0-9]+)/([^/]*)$ /./knowledgebase.php?action=displaycat&catid=$1 last; rewrite ^/knowledgebase$ /./knowledgebase.php last; location / { try_files $uri $uri/ /index.php?$args; } location /NaxsiRequestDenied { return […]
注意:这不是重复的,也不是这里的答案: Apache不解释.PHP文件 在我的本地Apachenetworking服务器上,我安装了PHP 5.6和7.0。 当我运行7.0脚本不执行(只是原始文本显示),但是当我切换到PHP 5.6一切都很好。 运行7.0时检查了我的httpd.conf ,它是正确的: LoadModule php7_module /usr/local/opt/php70/libexec/apache2/libphp7.so 在terminal中键入php –ini会产生以下内容: Configuration File (php.ini) Path: /usr/local/etc/php/7.0 Loaded Configuration File: /usr/local/etc/php/7.0/php.ini Scan for additional .ini files in: /usr/local/etc/php/7.0/conf.d Additional .ini files parsed: /usr/local/etc/php/7.0/conf.d/ext-mcrypt.ini 看起来正确 inputapachectl -v会产生: Server version: Apache/2.4.18 (Unix) Server built: Feb 20 2016 20:03:19 我觉得这是我的Apacheconfiguration的问题。
我在Ubuntu 15.10安装中成功安装了nginx,HHVM(使用FastCGI运行)等,而HHVM本身运行良好。 我的/ var / www目录由我的用户和组(例如sam:sam)拥有,所以我可以通过SSH和SFTP访问它并相应地更改文件。 当现在运行像WordPress这样的CMS时,它显然作为Web服务器运行(www-data),因此不会改变/添加/删除其后端的文件(例如上传文件,更新WordPress /插件),除非我改变用户和组的所有权到万维网数据。 有没有办法解决这个问题,以便能够通过PHP和SSH更改文件,而不让Web服务器与显然具有sudo权限的用户一起运行? 我相信运行FastCGI的“正常”的PHP能够绕过这个问题。
我试图设置php5.6.23作为我的服务器上使用php7作为主版本的快速CGI 但在我的一个领域,我得到这个错误: The requested URL / was not found on this server. 这里是我的虚拟主机conf: ScriptAlias / /usr/lib/cgi-bin DocumentRoot "/home/ue4xxxx/www" <Directory "/home/ue4xxxx/www"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny Allow from all AddHandler php-cgi .php Action php-cgi /cgi-bin/php-cgi-5.6.23 <FilesMatch "\.php*"> SetHandler php-cgi </FilesMatch> </Directory> ErrorLog ${APACHE_LOG_DIR}/ue4/error.log CustomLog ${APACHE_LOG_DIR}/ue4/access.log combined 我有php cgi bin位于/usr/lib/cgi-bin ,我想使用vhost root /home/ue4xxxx/www […]
我正在努力解决为什么加载.php文件时,我的.htaccess没有被考虑。 下面的文件坐在我的本地主机的webroot。 的.htaccess # Cause a HTTP 500 test file.html <html><body><h1>This should not show</h1></body></html> file.php <html><body><h1>This should not show</h1></body></html> 当我访问/index.html时,我得到预期的HTTP500当我访问/index.php时,html显示。 任何想法为什么.htaccess不会加载的PHP文件? Apache 2.4.6 VHost(/etc/httpd/vhosts.d/website.local.conf): <VirtualHost *:443> ServerName website.local ServerAlias www.website.local DocumentRoot /var/www/vhosts/website/website <Directory /var/www/vhosts/website/website> require all granted Options Indexes FollowSymLinks AllowOverride All </Directory> # Trigger PHP-FPM to run PHP execution <IfModule proxy_fcgi_module> ProxyPassMatch "^/(.*\.php(/.*)?)$" "unix:/var/www/vhosts/website/php-fpm.sock|fcgi://website/var/www/vhosts/website/website" […]
我写了一个简单的命令行程序,打开浏览器并将数据发布到给定的url。 由于某种原因一旦请求到达我的apache服务器,apache看到的是发布数据,但是没有发送给PHP。 当试图 echo var_dump($ _ POST,true) 我看到一个空的数组。 我已经设置mod_dumpio,可以看到进来的请求和POST数据肯定是存在的(我加倍间隔显示apache接收发布数据的行,所以它更容易find下面): [Thu Jul 07 08:24:48 2016] [notice] Apache/2.2.22 (Debian) PHP/5.4.36-0+deb7u3 configured — resuming normal operations [Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes [Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 17 bytes [Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: […]
我有Wordpress安装在根目录,并正确configuration使用永久链接。 除了WordPress的博客,我还有一个完整的自定义开发的PHP应用程序与几个页面。 我想不显示任何自定义页面的.php扩展名,但我现在得到所有的自定义PHP页面的404错误。 http:// url / blog-title-here (单词新闻页面 – 作品) http:// url / register (自定义php页面 – 结果在404) 以下是我的.htaccess的样子: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> 这里是我在httpd.conf中的 <Directory /> Options FollowSymLinks AllowOverride All RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond […]
奇怪的问题。 负载均衡器后面有6个节点。 他们是运行Ubuntu的高规格VPS。 在另一个节点上,我们运行Redis。 更多的节点运行MySQL。 整个LAMP设置主机Magento。 从基于文件的caching转换到Redis中央caching,我们开始逐个更改每个Magento节点,以便使用Redis槽Cm_Cache_Backend_Redis由于Redis被两台服务器使用,一切运行良好。 所以我们决定切换剩余的4台服务器。 但是,然后性能开始坦克大的时间。 New Relic证实了这个性能回落高达300%。 应用程序响应时间从合理的900-1200ms到3K + ms。 页面加载时间变得可怕,跳跃至less2秒,经常更多。 在大数据量(200个用户遍布6个服务器)的高峰负载下,回归更加深刻。 在痕迹中,我们开始看到Redis一切不好。 Category Slowest components Count Duration % Custom Varien_Simplexml_Element::asNiceXml 578 19,200 ms 33% Custom Varien_Simplexml_Element::extendChild 673 10,200 ms 18% Custom Cm_RedisSession_Model_Session::read 1 5,070 ms 9% Custom Varien_Simplexml_Element::extend 76 4,380 ms 8% Custom Varien_Simplexml_Element::hasChildren 69 2,690 ms 5% Custom Mage_Core_Model_Config::loadModulesConfiguration […]
我在WAMP上的openSSL上有这个奇怪的组合。 我的Windows命令提示符openssl version返回库版本 – > OpenSSL 1.0.2h 2016年5月3日 而我的PHPcurl调用 – echo "openssl version text: " . OPENSSL_VERSION_TEXT . "\n"; echo "openssl version text: " . OPENSSL_VERSION_TEXT . "\n"; 返回标题版本:openssl version text:OpenSSL 1.0.1t 2016年5月3日 我想知道如何更新OpenSSL头版本,因为我需要1.0.2为了APNS工作,因为我还在 HTTP / 2客户端前言string丢失或损坏。 接收字节的hex转储:504f5354202f332f6465766963652f613433646466376235 我正在使用Windows Server 2008 Windows NT OMEGA 6.1 build 7601(Windows Server 2008 R2企业版服务包1)AMD64 WAMP Apache / 2.4.17(Win64)Apache显示Apache / […]
我使用PHP在Windows IIS上安装了Wordpress。 从网站上下载非ASCII字符的文件是不可能的。 用ASCII字符重命名文件工作正常。 有谁知道我们如何解决这个问题? 尝试下载文件时收到错误:404 – 找不到文件或目录。 您正在查找的资源可能已被删除,更名或暂时不可用。 Windows Server 2012 R2,IIS 8和PHP 5.6.8