我正在运行一个ec2 ubuntu实例,我决定今天更新我的PHP到5.5.7,不幸的是它也触发了apache更新,这也导致了我很多错误,最大的一个是我的重写规则不再被打中,我相信它会改变.conf的东西。 我的网站conf(是的,我的前台和后台网站共享相同的.conf,有点懒,但方便。 <VirtualHost *:80> DocumentRoot /var/www/hivetracking-front/checkout/hive-tracking/public/ ServerName hivetracking.com ServerAlias www.hivetracking.com SetEnv _ENV production <Directory /> DirectoryIndex index.phtml RewriteEngine On LogLevel alert rewrite:trace6 Options Indexes FollowSymLinks AllowOverride All </Directory> ErrorLog /var/www/hivetracking-front/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/www/hivetracking-front/access.log combined </VirtualHost> <VirtualHost *:80> DocumentRoot /var/www/hivetracking-back/checkout/hive-tracking-api/public ServerName […]
在浏览我的网站时,甚至没有对它进行任何修改,整个事情突然发生在我身上。 错误日志充满了这个: Invalid command '%{HTTP_USER_AGENT}', perhaps misspelled or defined by a module not included in the server configuration Google会为此find0个结果。 什么可能导致这个? 我正在使用WordPress的Wordfence插件,偶尔修改.htaccess ,但它以前没有做过,并通过文件看我没有看到任何问题。
我正在尝试在Ubuntu 13.10 EC2实例上设置Apache VirtualHost,该实例将提供旧式目录中的媒体文档。 有一个现有的VirtualHost正在处理一个ProxyPass,以及以下内容: <VirtualHost *:80> ServerName media.ccachicago.org ServerAlias media.ccachicago.pragmatometer.com DocumentRoot /home/ubuntu/ccachicago/media <Directory "/home/ubuntu/ccachicago/media"> Options Indexes MultiViews FollowSymLinks AllowOverride None #Order deny,allow #Deny from all #Allow from 127.0.0.0/255.0.0.0 ::1/128 Order deny,allow Deny from all Allow from 0.0.0.0/0.0.0.0 ::1/128 </Directory> ServerAdmin [email protected] </VirtualHost> media.ccachicago.pragmatometer.com/css/style.css得到以下403错误: Forbidden You don't have permission to access / on this server. […]
我需要一个.htaccessexpression式来使用第二个getvariables或通过名称获取getvariables。 目前我的mod_rewrite改变URL去除index.php文件名,并改变pageName GETvariables,使它看起来像一个文件名。 我现在需要第二个GETvariables,但目前的方式,它甚至不承认第一次重写后获得variables,所以我想mod_rewrite处理第二个variables将是'blogpage = 1'(1将是你正在使用的博客页面),以便它看起来像这样: *********.co.uk/PageName/2 而不是这个 *********.co.uk/PageName?blogpage=2 由于目前没有这个工作,PHP脚本只是认为var不存在,并返回一个NULL值。 这是我目前的mod_rewrite条件: RewriteCond %{REQUEST_fileNAME} !-d RewriteCond %{REQUEST_fileNAME} !-f RewriteRule ^([^/\.]+)/?$ index.php?pageName=$1
我们最近更改了testing生产环境的服务器和主机。 目前我们还在testing,但是我们的http://test.example.com ,有时只是给某些用户显示一个空白页面。 这发生在桌面和移动环境中 我们使用Amazon Route 53 DNS进行DNS,最近又将Rackspace的托pipe服务提供商更改为了Linode。 configuration也有所变化。 Nginx现在位于Apache的静态资产之前。 没有改变的是使用php,mysql,ubuntu。 奇怪的是,99%的时间一切正常,但在某些情况下,我们已经注意到我们的testing人员正在看到一个空白页面。 页面加载,看起来死了,用户什么都看不到。 我没有检查页面源代码,这是我名单上的下一个要做的事情,但是它并没有发生在我身上。 nginx服务器configuration: server { listen 80; server_name www.testdev.example.com; return 301 $scheme://testdev.example.com$request_uri; } server { listen 80; server_name example.bestride.com; root /srv/www/example.com/public_html; index index.php; location ~* ^.+\.(?:js|css|jpe?g|htc|xml|otf|ttf|eot|woff|gif|png|svg|ico|pdf|html|htm)$ { access_log off; expires 30d; #add_header Vary Accept-Encoding; tcp_nodelay off; open_file_cache max=3000 inactive=120s; open_file_cache_valid 45s; open_file_cache_min_uses 2; […]
我必须从ngnix web服务器迁移到apache web服务器。 ngnixconfiguration为80和443的代理服务器 ngnixconfiguration如下: server { listen 443; server_name my_root_domain.com; root /etc/nginx/html; location / { proxy_pass http://my_root_domain.com.us-east-1.amazonaws.com; } server { listen 80; server_name my_root_domain.com; root /etc/nginx/html; location / { proxy_pass http://my_root_domain.com.us-east-1.amazonaws.com; } } 什么Apache的httpd.confconfiguration将如上所述? 提前Thnaks
是否有可能configurationApache不从本地主机连接时监听端口80,但允许端口80从外部IP连接?
看着phpinfo()我发现了很多模块,我不使用,因此他们只是浪费内存。 所以我想删除它们,但问题是,也有大量的'如何在PHP中安装模块X'的信息我找不到任何关于'如何卸载在PHP模块X'。 即使当我试图find并禁用他们在php.ini我没有运气。 例如与bcmath模块的唯一参考在php.ini是 [bcmath] ; Number of decimal digits for all bcmath functions. ; http://php.net/bcmath.scale bcmath.scale = 0 这只是改变一些参数,而不是禁用它。 我发现的一些答案告诉在这里添加函数: disable_functions =exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source 这完全是另一回事。 那么我怎样才能删除(或者在最坏的情况下禁用)php中的很多模块,运行在Apache上。 模块列表是很大的(bcmath,bz2,zip,dba,pdo,ftp,gettext,sopa,simpleXML等等)
当用户在我的服务器上传非常大的文件时,我想生成一个“Request Entity Too Large”错误。 用mod-php ,这很简单: <FilesMatch "^(upload|replace)$"> LimitRequestBody 3000000 </FilesMatch> 用php-fpm ,我尝试了“ <LocationMatch "^/(upload|replace)$"> LimitRequestBody 3000000 </LocationMatch> 但是,它没有工作。 接下来,我尝试在VirtualHost设置代理环境variables: SetEnv proxy-sendchunked ProxyPassMatch ^/([^\.]+)$ fcgi://127.0.0.1:9000${docroot}/$1 它也没有工作。 谁能告诉我如何做到这一点? 谢谢。
我在ubuntu 14.04上运行apache 2.4.9 。 Apache转动日志文件并归档它们,所以我最终得到了类似于: access.log.2.gz ,… access.log.N.gz 。 这个问题是难以分析的(我不得不解决,分析和删除它们)。 而且,我并不是真的希望这些日志放在服务器上(我宁愿把它们复制到本地机器上,然后从服务器上删除它们)。 现在我正在手动做这个,效率不高。 那么有没有办法configurationApache自动发送一个电子邮件与日志文件后,阿帕奇旋转呢? 如果这不是一个好主意,或者有更好的东西,我可以提出任何build议