apache2

Apache PHP5-FPM connection reset by peer

人走茶凉 提交于 2020-01-13 12:03:06
问题 Things like this keep popping up in my apache logs. How can I go about debugging this and/or preventing this in the future: (104)Connection reset by peer: FastCGI: comm with server "/var/www/php5.external" aborted: read failed FastCGI: incomplete headers (0 bytes) received from server "/var/www/php5.external", (4)Interrupted system call: FastCGI: comm with server "/var/www/php5.external" aborted: select() failed 回答1: In relation to your "select() failed" error and possibly the others, check

Limit number of concurrent connections in Apache2

无人久伴 提交于 2020-01-13 08:28:23
问题 Is there a way I can limit the number of concurrent connections to the Web Application running on my Apache Server. My server version is Apache 2.2.11 回答1: Have a look at limitipconn module. 回答2: I'm not sure if it will useful to you but definitely worth a chance. Maybe you can use the directives MaxClients and ListenBackLog Although they apply to the concurrent access to the entire server, not only your application, and on a resource base. 回答3: We completely built an application layer thing

Configuring virtual hosts on apache2

北城余情 提交于 2020-01-13 07:01:11
问题 I'm switching from Dreamhost to Rackspace Cloud hosting, since the formers ability to handle a rails app left something to be desired. I've got a CentOS server all set up and I've got my rails app deployed and the domains resolve and everything is great. Now I want to set it up so if I go directly to the IP address I'll get the the normal apache directory instead of the rails app. I thought the virtual host could manage this, but now both of them go to rails page or the apache page, as the

How can I turn off QSA? (query string append)

♀尐吖头ヾ 提交于 2020-01-13 03:57:05
问题 I'm using Apache2 and mod_rewrite to hide my query strings. These are the rules in question. RewriteCond %{QUERY_STRING} ^query=(.*)$ RewriteRule (.*) /search/%1 [R=301,L] RewriteRule ^search\/?$ /search/?query=test [R=301,L] When I visit /search (or /search/ ) I am correctly redirected to /search/?query=test (as per the last rule) From there, the RewriteCond and RewriteRule should kick in and redirect me to /search/test , right? From what I understand the %1 in my first RewriteRule

Apache shutdown - Couldn't grab mutex

穿精又带淫゛_ 提交于 2020-01-12 20:56:31
问题 For some reasons unknow to me, Apache is crashing. This is the apache log at the moment of the crash: [Sat Jun 02 02:38:05.196006 2018] [mpm_prefork:emerg] [pid 1122] (43)Identifier removed: AH00144: couldn't grab the accept mutex [Sat Jun 02 02:38:05.196006 2018] [mpm_prefork:emerg] [pid 1116] (43)Identifier removed: AH00144: couldn't grab the accept mutex [Sat Jun 02 02:38:05.198767 2018] [mpm_prefork:emerg] [pid 1115] (43)Identifier removed: AH00144: couldn't grab the accept mutex [Sat Jun

Apache shutdown - Couldn't grab mutex

最后都变了- 提交于 2020-01-12 20:55:33
问题 For some reasons unknow to me, Apache is crashing. This is the apache log at the moment of the crash: [Sat Jun 02 02:38:05.196006 2018] [mpm_prefork:emerg] [pid 1122] (43)Identifier removed: AH00144: couldn't grab the accept mutex [Sat Jun 02 02:38:05.196006 2018] [mpm_prefork:emerg] [pid 1116] (43)Identifier removed: AH00144: couldn't grab the accept mutex [Sat Jun 02 02:38:05.198767 2018] [mpm_prefork:emerg] [pid 1115] (43)Identifier removed: AH00144: couldn't grab the accept mutex [Sat Jun

Executing git commands via php over http

六眼飞鱼酱① 提交于 2020-01-12 08:27:36
问题 OS - Ubuntu 14.04 I am working on deployment using GIT webhooks for it. I have added the deployment keys to git repo and now I want to trigger the git pull origin master command when a push happens from my local repo. This is the test.php file I call via browser: <?php //echo "THis is a test file on a test repo for testing the deploy functionality using github webhooks!!!!"; echo exec('whoami'); echo exec('sh -x /var/www/proj/test/git.sh'); ?> This is the git.sh shell file: #!/bin/bash cd

I need “/var/www” but Apache2 try to use an empty “/var/www/html”

我的梦境 提交于 2020-01-12 05:39:08
问题 This days I sleep with my http://localhost working, and reading pages from /var/www ... I woke up with an "AH00094" error at Apache2 log, and (Apache2 created?) a surprised /var/www/html , that Apache2 try to use. Now my http://localhost/anything not works (error 404 at browser). How to fix it? I need back my http://localhost working with files at /var/www ! Context I am using Ubuntu12 with Apache2, all default and standard. I checked out error log by tail /var/log/apache2/error.log in order

kill users processes in linux with php

别说谁变了你拦得住时间么 提交于 2020-01-11 13:35:09
问题 I am trying to write a php script to kill users in a redhat machine. I know it is possible (and very insecure) to give apache the ability to do things as root, but I need to be able to kill any user from a web page, does anyone have any good working scripts or point me to a place to find some more info? I can use this code (which I took from php.net) to make it work, but I assume that this will work only if I give apache root permission or run apache as root. <?php exec("kill -9 $pid"); ?>

Reverse proxy with websocket mod_proxy_wstunnel

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-10 18:45:54
问题 I have a problem with the web sockets and my reverse proxy Apache, I have upgraded in latest release 2.4.5 and loaded the module mod_proxy_wstunnel . The httpd.conf : <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName www.toto.fr ServerAlias toto.fr ProxyPass /my_app http://1X.X.X.1:8080/my_app ProxyPassReverse /web_pmr http://1X.X.X.1:8080/my_app ProxyPassReverseCookiePath /my_app / ProxyPassReverseCookieDomain localhost my_app ProxyRequests off ProxyTimeout 15 #WEBSOCKETS