Articles of apache 2.2

<Location>和<Directory> Apache指令之间的区别

我已经安装了Zend服务器,并注意到以下内容已添加到我的httpd.conf文件中: <Location /ZendServer> Order Allow,Deny Allow from 127.0.0.1 </Location> Alias /ZendServer "C:\Program Files\Zend\ZendServer\GUI\html" <Directory "C:\Program Files\Zend\ZendServer\GUI\html"> AllowOverride All </Directory> 但我似乎无法理解位置和目录之间的区别。 我改变了下面的东西,这对我来说更有意义,它仍然有效: <Location /ZendServer> AllowOverride All Order Allow,Deny Allow from 127.0.0.1 </Location> Alias /ZendServer "C:\Program Files\Zend\ZendServer\GUI\html" 我可以保留自己的修改吗?还是应该按照原来的方式进行修改?

访问wsgi石墨脚本时拒绝客户端

我试图在我的Mac OS X 10.7狮子上设置石墨,我已经build立了Apache通过WSGI调用python石墨脚本,但是当我尝试访问它时,我从apache获取了一个forbiden并且在错误日志。 "client denied by server configuration: /opt/graphite/webapp/graphite.wsgi" 我已经检查过httpd.conf中允许的脚本位置,以及文件的权限,但看起来是正确的。 我需要做些什么来获得访问权限。 下面是httpd.conf,这几乎是石墨的例子。 <IfModule !wsgi_module.c> LoadModule wsgi_module modules/mod_wsgi.so </IfModule> WSGISocketPrefix /usr/local/apache/run/wigs <VirtualHost _default_:*> ServerName graphite DocumentRoot "/opt/graphite/webapp" ErrorLog /opt/graphite/storage/log/webapp/error.log CustomLog /opt/graphite/storage/log/webapp/access.log common WSGIDaemonProcess graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120 WSGIProcessGroup graphite WSGIApplicationGroup %{GLOBAL} WSGIImportScript /opt/graphite/conf/graphite.wsgi process-group=graphite application-group=%{GLOBAL} # XXX You will need to create this file! […]

为什么nginx进程与用户nobody运行

我试图设置nginx来运行我的一个rails应用程序,当看看ps -e | grep nginx输出时 ps -e | grep nginx ,我意识到nginx工作进程与用户nobody运行。 有没有原因,他们没有运行www数据?

Apache:不是chmod 755足以在Mac OS 10.5的Apache httpd上设置符号链接或别名?

在我的Mac OS 10.5机器上,我想设置~/Documents/foo/html类的~/Documents/foo/html子文件夹为http:// localhost / foo 。 我想要做的第一件事是使用Alias如下: Alias /foo /Users/someone/Documents/foo/html <Directory "/Users/someone/Documents/foo/html"> Options Indexes FollowSymLinks MultiViews Order allow,deny Allow from all </Directory> 这让我403禁止。 在我得到的error_log中: [error] [client ::1] (13)Permission denied: access to /foo denied 有问题的子文件夹具有chmod 755访问权限。 我试过指定喜欢像http://localhost/foo/test.php ,但也没有工作。 接下来,我尝试了符号链接路线。 进入/Library/WebServer/Documents并build立~/Documents/foo/html的符号链接。 文档根目录 Options Indexes FollowSymLinks MultiViews 这仍然让我403禁止: Symbolic link not allowed or link target not accessible: […]

如何在CentOS 64bit上从prefork更改为worker MPM?

我正在运行CentOS 64位,只是发现我正在我的dual quad Xeon上运行prefork MPM。 我被告知工作人员会给我更低的内存使用率和更高的性能,因为我运行一个非常高的stream量网站。 如果这是真的,我该怎么做?

我是否应该阻止这些相当蹩脚的尝试来攻击我的服务器?

我正在运行一个LAMP堆栈,没有安装phpMyAdmin (是)。 通过我的Apache服务器日志,我注意到像这样的东西: 66.184.178.58 – – [16/Mar/2010:13:27:59 +0800] "GET / HTTP/1.1" 200 1170 "-" "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)" 200.78.247.148 – – [16/Mar/2010:15:26:05 +0800] "GET /w00tw00t.at.ISC.SANS.DFind:) HTTP/1.1" 400 506 "-" "-" 206.47.160.224 – – [16/Mar/2010:17:27:57 +0800] "GET / HTTP/1.1" 200 1170 "-" "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)" 190.220.14.195 – – [17/Mar/2010:01:28:02 +0800] "GET […]

“服务器应该是SSL感知的,但没有configuration证书”错误

在最近将Apache2升级到版本2.2.31之后,我在SSL VirtualHost安装程序中发现了一个奇怪的行为。 我正在托pipe的一些网站显示了默认主机的证书,即使客户端是“ Server Name Identification ,也只有其中的一些。 这显示为常见的Firefox / Chrome的护照 – 警告如果您正在浏览您的家庭银行业务,您可能会被诈骗,但事实并非如此。 要清楚的是,如果服务器host.hostingdomain.org有自己的SSL,试图访问https://www.hostedsite.org报告host.hostingdomain.org证书,但一些https://www.hostedsite.me报告正确的证书。 所有站点都托pipe在相同的IP地址上,端口443.事实是VirtualHosting在HTTP端工作,并自动将SNI感知的客户端redirect到SSL,因此它向后兼容SNI-unaware客户端。 检查有问题的VirtualHosts的错误日志显示以下文本 [Tue Dec 25 16:02:45 2012] [error] Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] (/path/to/www.site.org.conf:20) 事实上,虚拟主机已经正确configuration了SSLCertificateFile。 问题很明显:如何解决这个问题?

Apache2代理超时

我有Apache2与PHP + PHP-FPMconfiguration根据: http://wiki.apache.org/httpd/PHP-FPM 我正在编写一个需要很长时间才能在内部虚拟主机上执行的脚本,但是如果脚本在30秒内执行,所有内容都将保持超时。 我的apache日志告诉我: [Wed Apr 17 21:57:23.075175 2013] [proxy_fcgi:error] [pid 9263:tid 140530454267648] (70007)The timeout specified has expired: [client 58.169.202.172:49017] AH01075: Error dispatching request to :, referer: 当试图运行脚本时,我会在执行完30秒后收到503 Service Unavailable 。 从逻辑上讲,这意味着我有超时指令或设置为30秒,但我有这些在我的Vhost的configuration: Timeout 600 <IfModule proxy_module> ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9001/home/pyrokinetiq/scripts/$1 timeout=600 ProxyTimeout 600 </IfModule> (php-fpm在我的端口9001上运行) 我也试着把httpd.conf的Timeout和ProxyTimeout没有区别。 似乎有另一个超时设置的某个特定于mod_proxy_fcgi ,但我找不到它。 我从官方tarball安装了Apache2的httpd,没有一个mods似乎有任何configuration文件。 如果任何人都可以指出我正确的方向,将不胜感激。

Apache作为OS X 10.6下的哪个用户,组运行?

任何人都知道在OS X(10.6)下Apache的默认用户/组? 我想正确设置权限。 已启用networking共享等

阻止其他应用程序绑定到端口80和443

上个星期,我接到了一个害怕的客户的电话,因为他认为他的网站被黑客攻击了。 当我查看他的网站时,我看到了apache2默认页面。 那天晚上我的服务器( Ubuntu 16.04 LTS )已经升级并重新启动。 通常当出现问题时,我会在晚上收到警报。 这次不是,因为监控系统检查HTTP状态码200,并且apache2默认页面带有状态码200。 发生了什么事是,在启动期间, apache2绑定到端口80和443比我的实际networking服务器nginx更快。 我没有自己安装apache2。 通过aptitude why apache2我发现php7.0包需要它。 简单地删除apache2将无法正常工作,因为显然php7.0需要它。 是否有可能创build一个限制,只有nginx允许绑定到端口80和443? 其他的解决scheme也是值得欢迎的。