我在使用Apache / Tomcat正确代理其他虚拟主机时遇到了问题。 基本上,我有一个主要的虚拟网站,代理到Tomcat,并正常工作。 但是,我安装的其他虚拟主机不起作用。 他们都转回到主站点。 这是我第一次设置这个,所以我显然正在做一些可能导致问题的事情。 <VirtualHost *:80> ServerAdmin webmaster@secondary_domain.com ServerName secondary_domain.com ServerAlias www.secondary_domain.com ProxyPreserveHost On ProxyPass / ajp://localhost:8009/ ProxyPassReverse / ajp://localhost:8009/ DocumentRoot /var/www/secondary_domain.com DirectoryIndex index.jsp <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/secondary_domain.com/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ErrorLog /var/www/secondary_domain.com/logs/error.log LogLevel warn CustomLog /var/www/secondary_domain.com/logs/access.log combined […]
我正在运行Ubuntu Maverick + Apache2.2,我读了一些关于使用mod_vhost_alias来即时提供/创build子域的信息。 但是,当我尝试通过apt来安装它时,我所能find的就是mod_vhost_hash_alias。 这是一样的吗? 它的所有文档在哪里? 下面的apache网站查询返回没有有用的信息http://www.google.com/search?&q=mod_vhost_hash_alias+site:apache.org 谢谢
我试图configuration我的Subversion服务器使用apache2,mod_dav_svn和基本摘要authenticaton(现在)。 我已经设置了子域svn.example.com来提供回购,并创build了如下的虚拟主机configuration文件: <VirtualHost *:80> ServerAdmin [email protected] ServerName svn.example.com <Location /> DAV svn # Automatically map any "/foo" URL to repository /var/svn/repos/foo SVNParentPath /var/svn/repos # List repositories if viewed from a web browser SVNListParentPath on # Authentication: Digest AuthName "Private Area" AuthType Digest AuthUserFile /etc/svn-auth.htdigest # Authoriztion: Authenticated users only Require valid-user </Location> </VirtualHost> 这个conf文件(svn.example.com)位于apache2的sites-available目录中,也位于sites-enabled内。 最后,我使用htdigest创build了auth用户文件。 […]
我正在尝试在一个.htaccess文件中编写一个ReriteRule,它将把请求redirect到我们的新域。 这是我正在尝试使用的规则。 RewriteEngine On RewriteBase / # Domain name fix RewriteCond %{HTTP_HOST} !www.university.edu$ [NC] RewriteRule ^/(.*)$ http://www.university.edu/engineering/$1 [R=301] RewriteRule ^index\.php$ – [L] 我的意图是,对这个不包含域名www.university.edu的Web服务器的请求将被redirect到工程子网站。 在此Web服务器上承载的所有东西都必须显示为来自该子网站。 这RewriteRule不起作用。 我使用错误的方法? 我应该使用Vistual主机还是服务器别名?
我有一个3.1.0 Rails应用程序(机架1.3.3)运行在一个Cantos 5.6虚拟机使用Apache和Passenger 3.0.9 – 所有最近安装。 一切都完美无缺,除非偶尔会有一些请求长时间延迟。 大多数时候,相同的请求很快。 它发生在POST和GET请求上。 对于一个随机的长延迟请求,apache access_log,error_log和rails日志都会立即响应tail -f。 但是在浏览器中的响应是非常迟缓的。 在Chrome中,networking时间轴图表显示,它正在等待很长一段时间(15秒)。 在延迟之后,所有的东西都照常显示。 apache error_log显示了这样的行: cache: [GET /subprojects/new] miss 这可能是问题吗? 可能是什么原因/修复? 我不确定问题出在哪里,所以不知道接下来要做什么。 任何想法或build议? 提前谢谢了。 🙂
我想重新定义用JkMount装载的Tomcat web服务的基本URL。 我尝试了以下内容: JkMount /myapp/* ajp13_worker RewriteRule ^/service/v1/(.*)$ /myapp/$1 [PT,QSA] 原始url的工作,例如: /myapp/ /myapp/brand /myapp/classified?idBrand=0&priceMax=&page=1 我试图获得的URL是: /service/v1/ /service/v1/brand /service/v1/classified?idBrand=0&priceMax=&page=1 但他们返回404(从Apache,而不是从Tomcat)。 如何使其工作? 更新 :我只是忘了 RewriteEngine on 现在它工作。
我在Windows 2008盒子上运行Apache HTTP Server 2.2。 但由于某种原因,我只能获得本地加载的网站。 该框分配了3个IP地址。 我已经configurationIIS来侦听前两个IP,并通过在httpd.conf文件中指定“Listen 209.67.xxx.xx:80”来为第三个IP分配Apache。 我认为这是一个非常标准的安装,这是我改变的唯一的东西。 然后我打开服务器中的浏览器并inputIP。 默认页面是“It works!” 出现。 大! 但是,当我尝试从外部从另一台机器中打开该页面时,需要几秒钟,然后加载一个空白页面。 页面html源代码也没有。 我知道这不是防火墙问题,因为IIS能够整天提供页面。 这不是与IP的东西,因为当我告诉IIS听这个IP,它的工作原理。 另一个奇怪的事情,当我telnet 209.67.xxx.xx 80'它似乎连接好。 然后我做了一个'get',和浏览器是一样的…想了几秒钟,然后什么也没有返回。 几星期前,我已经在另一个环境中使用了这个设置,但是我们已经迁移到一个新的数据中心,现在不能工作。 不知道还有什么要做的。 它是我缺less的Apacheconfiguration吗? 请帮忙! 谢谢!
当我试图访问像%20xyz.jpg这样的url时,我得到了一个404错误。 当我查看日志时,Apache将%20转换为\ xa9(每个URL编码的字符都转换为它们的\ xXY值,而不是正确的字符(在这种情况下是空格)。 我尝试了AllowEncodedSlashes但是这不起作用。 我应该把哪个Apache指令放在我的VirtualHost或.htaccess中来做类似的事情 /img/cms/MISC/Certifi%C3%A9%20AB.jpg 成为: /img/cms/MISC/Certifié AB.jpg 并不是 : /img/cms/MISC/Certifi\xc3\xa9 AB.jpg 这是我的Apacheconfiguration: <VirtualHost *:80> ServerName mywebsite.com Redirect / http://www.mywebsite.com/ </VirtualHost> <VirtualHost *:80> DocumentRoot "/home/mywebsite.com/www/" ServerName www.mywebsite.com <Directory "/home/mywebsite.com/www/"> Options Includes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> ErrorLog /var/log/apache2/mywebsite.com.error.log LogLevel warn CustomLog /var/log/apache2/mywebsite.com.access.log combined ServerSignature Off </VirtualHost> 而我的.htaccess(由Prestashop生成): # .htaccess […]
如果我有Apache虚拟主机,我可以为每个主机设置最大的并发连接吗? 我有一个API服务,得到了很多的请求,挨饿的主站点,我可以限制并发连接到http://api.example.com而http://example.com获得更多的连接。
我按照这个教程安装godingious http://coding-journal.com/installing-gitorious-on-ubuntu-11-04/ 。 我从来没有安装ruby或gitorious,所以我的知识是新的。 浏览到我正在使用的域后出现错误。 错误读取语法错误行3 col 22; repository_base_path:“/ var / www / gitorious / repositories”“ [configuration/ gitorious.yml] production: repository_base_path: "/var/www/gitorious/repositories" gitorious_client_port: 80 gitorious_host: git.mypressbox.biz archive_cache_dir: /var/www/gitorious/tarballs archive_work_dir: /tmp/tarballs-work hide_http_clone_urls: true is_gitorious_dot_org: false 我不知道要改变什么。 运行gem -v返回1.8.11。 任何帮助是极大的赞赏。