我的机器上安装了Ubuntu 12.04 64位和Apache 2.2.22,用于开发。 无论如何,似乎从一天到下一天,它将以毫秒为单位提供服务,现在每次只能提供5分钟1秒。 我相信这是因为apache.conf的超时值是300 。 我不明白的是为什么它会超时。 我已经安装了xdebug,但是我没有触发它,它不是自动启动,所以我真的认为这没有什么区别,他们一起工作得很好。 我在Apache是一个完整的noob,不知道如何开始debugging的问题。 我已经检查了日志,但他们似乎没有给我任何有趣的东西。 Apache error.log不会更改,只会在引导时生成通知日志。 实际的应用程序日志更有趣一些,因为它更新app-access.log和app-error.log ,但是访问日志只是说GET请求,错误日志是所有信息。 这对我来说毫无意义,所以这里是一个请求的例子。 [Mon Jan 20 12:01:39 2014] [info] [client 127.0.0.1] (32)Broken pipe: core_output_filter: writing data to the network [Mon Jan 20 12:01:43 2014] [info] [client ::1] Connection to child 6 established (server app:443) [Mon Jan 20 12:01:43 2014] [info] Seeding PRNG […]
我试图让Apache列出用户下载目录的内容,所以我在/ var / www /中创build了一个指向/ home / user / downloads的别名 我有chmod -R 755 /home/user/download/ 和我的Apacheconfiguration如下? <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/ <Directory /> Options FollowSymLinks AllowOverride All </Directory> <Directory /var/www/> Options -Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # […]
我知道一个位置是/ etc / httpd / logs / 。 有多less个文件。 所以我删除了所有,并尝试运行错误页面,并得到以下 ./ ../ archive/ fpcgisock= suexec_log suphp_log 不知道它实际上是什么文件。 我希望error_log文件,但它不在那里。 我有centos 6。
我有一个WordPress的安装在一个专用的服务器体面的内存(8GB以上)。 WordPress的安装包括许多插件 – 50个活动插件。 最重要的是要注意的是WordPress的多语言WPML插件。 主题是织女二临 。 这个堆栈是LAMP – CentOS 6.3,Apache 2.4.4,Percona MySQL,PHP-FPM。 我一直很蠢,没有设置testing或登台服务器。 一切运行良好,直到我更新到WordPress 3.8,并同时更新了几个插件。 那时候我没注意,但是所有的小工具都搞乱了,导航等等 我启用了error_log一点,即 ini_set('log_errors',TRUE); ini_set('error_reporting', E_ALL); ini_set('error_log', dirname(__FILE__) . '/error_log.txt'); 这导致了一个巨大的文件 – 基本上每4分钟左右error_log增长大约一个GB。 我在错误日志中发现的主要错误是数据库服务器断开连接,更为人所知 MySQL服务器已经消失 正如Rackspace所build议的,我编辑了my.cnf来添加 wait_timeout = 60 没有帮助。 还向my.cnf添加了caching query_cache_type = 1 query_cache_limit = 8M query_cache_size = 512M 没有帮助。 (是的,我每次编辑my.cnf时重新启动mysql) 还试过这里build议的方法:在wp-db.php之前 $this->select( $this->dbname, $this->dbh ); 我补充说 $this->query("set session […]
目前我有以下configuration的服务器。 在过去的几年里,一切都很好。 Windows Server 2003与IIS 6 / PHP 5.2.17 / MySQL 5.0.51a / PhpMyAdmin 3.5.6 我只需要一些关于迁移和兼容性的技术帮助。 所以我可以研究并决定将来对我有什么好处。 当我在互联网上学习时,我意识到我需要升级或改变这里的东西。 IIS 6到Apache Web Server Windows Server 2003到Ubuntu / CentOS / Fedora服务器 但是我不能决定我该走什么方向。 Linux和Apache是免费的,但我从来没有使用它们,所以我不知道从Windows迁移到Linux是多么困难。 我的所有网站都build立在IIS上的PHP 5.2.17 / MySQL 5.0.51。 所以即使我在Linux上使用Apache。 我不知道在编程中需要做多less修改,所以所有的网站也在Apache Web服务器上工作。 谢谢,
遵循Apache网站上的说明,我在httpd.conf文件的末尾添加了以下内容: RewriteEngine on RewriteMap lowercase int:tolower #define the map file RewriteMap vhost txt:/web-data/vhost.map # deal with aliases as above RewriteCond %{REQUEST_URI} !^/icons/ RewriteCond %{REQUEST_URI} !^/cgi-bin/ RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$ # this does the file-based remap RewriteCond ${vhost:%1} ^(/.*)$ RewriteRule ^/(.*)$ %1/httpdocs/$1 RewriteCond %{REQUEST_URI} ^/cgi-bin/ RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$ RewriteCond ${vhost:%1} ^(/.*)$ RewriteRule ^/(.*)$ %1/cgi-bin/$1 [H=cgi-script] 当我运行service httpd […]
我一直试图通过钩子或骗子得到/pipe理/静态/服务在Apache SSL VirtualHost,最好由Apache(这是转发SSLstream量到Django Gunicorn实例),或禁止Apache,至lessGunicorn服务静态的内容,而我的工作更好的解决scheme。 我得到一个Apache服务的403,我检查过的所有权限都表明/usr/lib/python2.7/dist-packages/django/contrib/admin/static/目录(和父母根据需要)是由运行服务器的用户可读和可执行。 你可以看到在下面的VirtualHost中有什么错误,这将解释为什么Apache没有提供有问题的目录作为别名目录? <VirtualHost *:443> ServerName ccachicago.pragmatometer.com Alias /media/ "/home/jonathan/ccachicago/media/" <Directory "/home/jonathan/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 </Directory> Alias /admin/static/ "/usr/lib/python2.7/dist-packages/django/contrib/admin/static/" <Directory "/usr/lib/python2.7/dist-packages/django/contrib/admin/static/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> ProxyPass /media/ ! […]
我在运行apache的主机上有多个虚拟主机。 这是一个testing系统,我想给用户“基本authentication”访问他们的网站。 为此我有一个基本的身份validationconfiguration的虚拟主机文件: <VirtualHost *:80> ServerName demo.com ServerAlias test.demo.com DocumentRoot /filepath/to/demo.com/public_html <Location /> Deny from all AuthUserFile /filepath/to/demo.com-users AuthName authorization AuthType Basic Satisfy Any require valid-user </Location> </VirtualHost> 这工作正常,可以完成每个虚拟主机域。 问题:对于工作人员,我想在普通的httpd.conf文件中设置一个全局的“auth指令”,允许他们一步login到所有虚拟主机。 可以这样做,怎么样?
美好的一天, 我使用Apache作为我的Tornado应用程序在http://localhost:8090上运行的反向代理。 我希望Apache将通过HTTPS到达/ api / v2的所有内容代理到http://localhost:8090 。 Apache也负责authentication,因此我需要将authentication的用户名转发到我的Tornado应用程序。 因此使用mod_rewrite 。 我已经将以下条目添加到Apacheconfiguration中: <Location "/api/v2"> ProxyPass http://localhost:8090 # Next four lines are to set X-Forwarded-User RewriteEngine On RewriteRule .* – [E=RU:%{LA-U:REMOTE_USER}] RequestHeader set X-Forwarded-User %{RU}e SSLRequireSSL AuthType Basic AuthName "My site" AuthBasicProvider external AuthExternal pwauth Require valid-user Order deny,allow Allow from all </Location> 这工作奇迹,除了我在我的Apache日志中看到以下错误: Request exceeded the […]
我们有以下设置: / var / www / public < – DocumentRoot / var / www / functions < – php函数 / var / www / config < – phpconfiguration 通过apache vhostconfiguration,我们打开了basedir: php_admin_value open_basedir "/var/www/functions/:/var/www/config/" 现在如果我在函数或configuration文件中包含一个文档,那么按预期工作。 但是,如果我从一个不包含函数内的configuration。 所以: /var/www/public/index.php可以包含../functions/test.php 但 /var/www/functions/test.php不能包含../config/config.php 有效的open_basedir限制。 文件(../ config / config.php)不在/var/www/functions/test.php的允许path(/ var / www / functions /:/ var / www / config […]