Articles of apache 2.2

如何使Apache Web Server在两个不同的端口上侦听?

我想在家里安装一个Apache Web服务器来监听80端口和8080端口。 我已经添加了Listen 8080到httpd.conf并重新启动了Apache服务,但服务器似乎没有在8080上进行侦听。在http:// localhost:8080中冲出并且不显示我的index.html,而是http :// localhost将显示我的index.html。 我如何让它听80和8080?

configurationApache2代理WebSocket?

WebSocket协议是HTTP协议的扩展。 然而,Apache2的代理模块似乎并不知道,并抛出重要的标题,将呼叫转换为标准的HTTP调用。 有没有办法让Apache2(1)理解WebSocket或(2)只是盲目地传递任何它得到?

安装ubuntu服务器发送邮件()

我尝试了很多search,但无法find如何设置一个Ubuntu服务器,以便我可以通过使用php中的mail()函数的PHP发送邮件。 我在我的服务器上安装了apache2,mysql和php5。 谢谢。

Ubuntu的Apache:httpd.conf或apache2.conf?

我应该使用哪两个文件中的哪一个configurationApache? httpd.conf是空的,而apache2.conf则不是。 它使我困惑!

如何在Apache httpd虚拟主机中configuration基本身份validation?

我正在尝试使用Apache httpconfigurationmercurial访问。 它需要authentication。 我的/etc/apache2/sites-enabled/mercurial如下所示: NameVirtualHost *:8080 <VirtualHost *:8080> UseCanonicalName Off ServerAdmin webmaster@localhost AddHandler cgi-script .cgi ScriptAliasMatch ^(.*) /usr/lib/cgi-bin/hgwebdir.cgi/$1 </VirtualHost> 我在互联网上读到的每一个教程都告诉我要插入这些行: AuthType Basic AuthUserFile /usr/local/etc/httpd/users 但是当我这样做时,我得到以下错误: # /etc/init.d/apache2 reload Syntax error on line 8 of /etc/apache2/sites-enabled/mercurial: AuthType not allowed here 我的发行版是一个定制的Ubuntu,名为Turnkey Linux Redmine

ServerName和ServerAlias如何工作?

这是虚拟主机configuration的以下部分,我需要进一步说明: <VirtualHost *:80> # Admin email, Server Name (domain name), and any aliases ServerAdmin [email protected] ServerName 141.29.495.999 ServerAlias example.com … 这是和示例configuration,类似于我目前有(我没有一个域名的时刻)。 <VirtualHost *:80> – 允许在端口80上对所有可以联系到该服务器的IP进行HTTP请求的以下设置。 例如,如果可以在多个IP上访问服务器,则可以将此指令限制为一个而不是两个。 ServerName – 如果HTTP请求的主机部分与此名称匹配,则允许请求。 通常这是一个映射到IP的域名,但在这种情况下,HTTP请求主机必须匹配这个IP。 ServerAlias – 服务器接受的备用名称。 对于我来说,令人困惑的部分是,在上面的情况下,如果我设置ServerAlias mytestname.com ,然后向mytestname.com发出HTTP请求,那么必须有一个指向服务器IP的DNSlogging才能工作? 在这种情况下,ServerAlias只是基本上EXTRA ServerName条目? 说我有一个DNS条目,这样foobar.com = 141.29.495.999但后来我有ServerName = 141.29.495.999和ServerAlias是空的,这意味着,虽然foobar.com被parsing到正确的IP,因为没有参考在ServerName或ServerAlias接受foobar.com? 或者其他的东西。 男人我很困惑。

如何通过htaccessredirect根和只有根?

我只想将我的根redirect到另一个url,但是维护它们所属的所有/ sub /目录(并redirect) 例: mysite.com/1redirect到某处mysite.com/admin打开一个页面 我希望mysite.com/redirect到mysecondsite.com,只有这个301redirect使用htaccess

带有SSL的Apache ProxyPass

我想通过非SSL站点代理来自SSL站点的请求。 我的Apache httpd.conf看起来像这样: <VirtualHost 1.2.3.4:80> ServerName foo.com ProxyPass / https://bar.com/ </VirtualHost> 所以,当我访问http://foo.com时 ,我希望apache向https://bar.com发出请求,并向我发送它提取的页面。 相反,我得到一个500错误,并在错误日志中,我看到: [error] proxy: HTTPS: failed to enable ssl support for 4.3.2.1:443 (bar.com) 大概我在这里错过了一个指令。 这可能是什么? 没关系安全影响。 我完全理解风险。

https和http for apache对性能的影响有多大?

大致相当于同一页面的http的性能影响会达到多less? 假设我可以处理1000个请求/秒的abc.php,通过https访问时会减less多less? 我知道这可能是依赖于硬件,configuration,操作系统等,但我只是寻找一个一般的经验法则/估计。

如何让apache2redirect到一个子目录

我在debian etch上运行apache2,使用多个虚拟主机。 我想要redirect,以便http://git.example.com转到http://git.example.com/git/ 应该真的很简单,但谷歌是不是很切割它。 我已经尝试了redirect和重写的东西,他们似乎并没有做我想要的东西…