我正在使用mod_fastcgi的Apache2在私有共享服务器上运行PHP。 我已经把这个与suexec结合起来,所以我可以运行每个虚拟主机,因为它是自己的UNIX用户,保持WordPress的所有者高兴。 有一个网站偶尔会因Twitter上的刮板而产生一波stream量,这会产生10个php-cgi进程,每个进程使用50MB。 这在我的一个512MB从服务器上产生了很多的OOM错误。 我很想将每个用户限制在4个PHP进程中,同时保持全局最大进程数达到8个。在加载mod_fastcgi.so的configuration文件中,我定义了以下 FastCgiConfig -maxClassProcesses 4 -maxProcesses 8 在我的每个虚拟主机的cgi-bin / php.fcgi文件中,我还设置了以下内容: #!/bin/bash ### Set PATH ### PHP_CGI=/usr/bin/php-cgi PHP_FCGI_CHILDREN=0 PHP_FCGI_MAX_REQUESTS=1000 ### no editing below ### export PHP_FCGI_CHILDREN export PHP_FCGI_MAX_REQUESTS exec $PHP_CGI 不幸的是,这并没有为我的环境做很多事情,当加载testing服务器时,我仍然发现一个用户运行超过4个php-cgi进程,导致更多的OOM问题。 我在这里做错了什么?
我正在尝试在Ubuntu 12.04上设置apache虚拟主机。 除了我使用/ var / www不是/ home / www之外,我在这里http://www.debian-administration.org/articles/412中遵循了这个指南。 我已将文档根文件夹设置为755权限。 这是一个服务器,我用尽了我的房子,所以它可能是我的路由器可能是一个问题,我想? 我没有使用代理服务器。是否需要设置端口转发的某种方式来运行虚拟主机? (是的,它在vhosts之前工作正常,我得到了502响应错误(坏的网关),这里是我的两个启用的网站 NameVirtualHost *:80 <VirtualHost *:80> ServerName www.functioncreate.com ServerAlias functioncreate.com # Indexes + Directory Root. DirectoryIndex index.html DocumentRoot /var/www/functioncreate/htdocs/ # CGI Directory ScriptAlias /cgi-bin/ /var/www/functioncreate/cgi-bin/ <Location /cgi-bin> Options +ExecCGI </Location> # Logfiles ErrorLog /var/www/fucntioncreate/logs/error.log CustomLog /var/www/functioncreate/logs/access.log combined </VirtualHost> 第二个: # # Example.com (/etc/apache2/sites-available/www.example.com) # […]
Ubuntu 12.04 LTS 阿帕奇/ 2.2.22 http://server/lightsquid/给用户名/密码请求窗口,然后«500内部服务器错误»。 无论使用用户名和密码,错误都会上升:有效或无效。 如果线Require valid-user被删除,一切工作正常,所以问题是在mod_authnz_ldap模块。 模块mod_authnz_ldap已启用。 Apacheconfiguration: Alias /lightsquid /usr/lib/cgi-bin/lightsquid <Directory "/usr/lib/cgi-bin/lightsquid"> AddHandler cgi-script .cgi Options +ExecCGI Order allow,deny Allow from all AuthType Basic AuthName "USE YOUR WINDOWS ACCOUNT" AuthBasicProvider ldap AuthzLDAPAuthoritative on #AuthzLDAPAuthoritative off #AuthUserFile /dev/null AuthLDAPBindDN "CN=squid_auth,DC=domain,DC=ru" AuthLDAPBindPassword "*****************" AuthLDAPURL "ldap://dc2.domain.ru/dc=domain,dc=ru?sAMAccountName?sub?(objectClass=*)" Require valid-user </Directory> 将AuthzLDAPAuthoritative off更改为 AuthzLDAPAuthoritative AuthUserFile /dev/null […]
我正在使用标准的LAMP设置运行一个2GB的Centos 5.9服务器。 我正在运行一个WordPress的网站,所以没有什么要求性能明智的。 然而,当我尝试访问我的WordPress的网站时,MySQL服务器似乎不断崩溃,因为我得到一个错误连接到数据库。 我检查了CPU,它运行在100%,RAM也是100%。 我试过了 服务mysqld重启 一切恢复正常约10分钟,然后再次崩溃。 我也试过调整my.cnf文件和httpd.conf文件,但是这并没有解决它。 当我跑步 netstat -ntu | awk'{print $ 5}'| cut -d':'-f1 | grep“^ [0-9]”| sort -g | uniq -c 我得到以下输出: 1 31.222.135.11 1 50.56.142.152 1 50.57.61.11 1 78.136.44.13 2 78.19.241.93 201 127.0.0.1 为什么我的环回地址上有201个连接? 感谢您的帮助提前。
我有一个最新的运行Apache 2.2.22-1ubuntu1.4 Ubuntu 12.04服务器。 对于每个HTTPS请求,我的Apache日志都会logging与encryption连接有关的错误消息。 自签名证书是根据来自Ubuntu 12.04的指令生成的»Ubuntu服务器指南»安全»证书 Qualys SSL Labs显示服务器configuration(自签证书除外)没有问题。 Apacheconfiguration的相关部分是: <VirtualHost *:443> ServerName site.domain.net:443 …snip… SSLEngine on SSLCertificateFile /etc/apache2/ssl/apache.crt SSLCertificateKeyFile /etc/apache2/ssl/apache.key SSLProtocol all -SSLv2 -SSLv3 SSLHonorCipherOrder on SSLCompression off </VirtualHost> 错误日志显示与此类似的条目: [Wed Feb 19 10:47:01 2014] [info] [client xx.xx.61.4] Connection to child 2 established (server site.domain.net:443) [Wed Feb 19 10:47:01 2014] [info] Seeding PRNG […]
我在Ubuntu 12.04服务器上安装了Request Tracker 。 它被configuration为通过winbind对活动目录进行身份validation。 以下是apache2configuration的相关部分: AuthType NTLM AuthType Negotiate AuthName "Request Tracker" NTLMAuth on NTLMAuthHelper "/usr/bin/ntlm_auth –helper-protocol=squid-2.5-ntlmssp" NegotiateAuth on NegotiateAuthHelper "/usr/bin/ntlm_auth –helper-protocol=gss-spnego" 请求跟踪器匹配用户名apache对其自己的用户进行身份validation,并自动login。 该站点位于Internet Explorer的Intranet区域,因此会自动logging人员。对大多数人来说,它是完美的。 在Apache访问日志中,它显示了每个请求login的人的用户名。 但是,从我们的两台电脑中,请求跟踪器无法将用户名与帐户相匹配。 看Apache的日志,显而易见的是,当试图从该计算机login时,用户名Apache的logging是DOMAIN\\username ,而不仅仅是username 。 Apacheauthentication他们就好 – 但与意外格式化的用户名。 从这些计算机login的人无关紧要,login信息logging为DOMAIN\\username 。 据我所知,有问题的计算机没有什么特别的。 他们从相同的图像部署,具有相同的组策略,相同的Windows更新,相同的IE版本(9)作为工作。 什么可能导致用户名被格式化的方式的差异? 编辑:因为它可能与桑巴有关,这里是smb.conf的相关部分: [global] security = ads realm = STLEONARDS.LOCAL password server = * workgroup = STLEONARDS winbind […]
我在虚拟主机configuration文件的Apache <Directory>上下文中有一个相当长的授权configuration指令块。 它具有LDAP凭据和一个复杂的filter,在vhostconfiguration文件中重现会很烦人。 这是一个简单的例子: ServerName server.domain.com DocumentRoot /var/www/server.domain.com <Directory /var/www/server.domain.com/> AllowOverride FileInfo Options +ExecCGI # PASSWORD PROTECT AuthType Basic AuthBasicProvider ldap file AuthName "INTERNAL" AuthLDAPURL ldap://xxx AuthLDAPBindDN uid=xxx,cn=xxx AuthLDAPBindPassword xxx AuthzLDAPAuthoritative on AuthUserFile /var/www/server.domain.com/.htpasswd Require valid-user </Directory> Alias /alias1 /var/www/alias1.domain.com <Directory /var/www/alias1.domain.com> # ? </Directory> Alias /alias2 /var/www/alias2.domain.com <Directory /var/www/alias2.domain.com> # ? </Directory> Alias /alias3 […]
不pipe我对EC2实例做什么,任何大小和apache / ubuntu。 我无法得到超过1400个并发连接。 将prefork设置设置为高,将ulimit设置为1000000 这与AWS有关吗?
我对GIT相当陌生,总体来说在基础设施方面不是很有经验。 然而,我想要做的似乎是非常基本的,我不能做到这一点。 我正在尝试通过Apache中的HTTPS创build一个GIT服务器。 我有我的GIT仓库的configuration(在CentOS系统上): SetEnv GIT_PROJECT_ROOT /opt/repo-git/my-custom-repo.git SetEnv GIT_HTTP_EXPORT_ALL ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/ SetEnv REMOTE_USER=$REDIRECT_REMOTE_USER <Directory "/opt/repo-git/my-custom-repo.git"> Options -Indexes FollowSymLinks AllowOverride AuthConfig FileInfo Order allow,deny Allow from all </Directory> <Directory "/usr/libexec/git-core"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> <Location /git> Order deny,allow Allow from all Dav on AuthType Basic AuthzLDAPAuthoritative on […]
我在Apache后面的一个服务器上安装了一个DirectAdmin安装程序。 从机器外部(通过Internet和Intranet)访问VirtualHost时,一切正常,但从本地访问相同的VirtualHost(即通过在服务器内使用curl mywebsite.com)时遇到问题。 相关的networking设备: eth0 : IP Address inside the NAT eth0:0 : IP Address outside the NAT (ie public IP Address) eth1 : LAN IP Address lo : Loopback 下面是相关的httpdconfiguration: Listen 80 NameVirtualHost *:80 DocumentRoot "/var/www/html" <VirtualHost *:80> ServerName mydomain.com … </VirtualHost> 当使用通配符的NameVirtualHost可以期待一个请求,在请求头中设置Host: mydomain.com指令(这个curl会)由VirtualHost指令提供服务。 虽然,当我从服务器内部curl mydomain.com时,Apache回VirualHost DocumentRoot不允许我访问VirualHost主机。 我得到它的唯一方法是编辑/etc/hosts并为mydomain.com定义NAT内部的IP。 另一个可能有用的信息: 我跑了<?php print_r($_SERVER); ?> <?php print_r($_SERVER); […]