Apache细节 服务器版本:Apache / 2.2.15(Unix)服务器内置:Aug 28 2015 22:18:57 漆 varnishd(varnish-3.0.7 revision f544cd8)Copyright(c)2006 Verdens Gang AS Copyright(c)2006-2014 Varnish Software AS OS CentOS版本6.7(最终版) Linux内核 2.6.32-042stab113.11#1 SMP Fri Dec 18 17:32:04 MSK 2015 x86_64 x86_64 x86_64 GNU / Linux 注意:当试图开始得到这个错误,并善意的build议如何解决这些错误,并启动Apache服务器。 我也安装和configurationvarnishcaching代理服务器。 Failed to start apache : Starting httpd: [Sat Mar 12 16:36:02 2016] [error] VirtualHost _default_:443 — mixing * […]
我在标题中的问题可能是错误的,但我没有其他的想法如何说出来。 (专家请帮助这个?)。 当我到达URL http://subdomain.localhost时,基本上子域在我的开发机器上工作。 我想要实现的是使用http://subdomain.jacques加载相同的网站。 jacques是我电脑的名字。 这是我在我的Windows hosts文件。 127.0.0.1 localhost localhost localhost jacques localhost subdomain.127.0.0.1 subdomain.localhost subdomain.localhost subdomain.localhost subdomain.jacques subdomain.localhost 这是我在vhosts.conf文件中。 ServerName localhost DocumentRoot "c:\web" <VirtualHost jacques:80 jacques *:80> <Directory "c:\web"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order Allow,Deny Allow from all Require all granted </Directory> ServerName localhost ServerAlias localhost DocumentRoot "c:\web" </VirtualHost> <VirtualHost […]
我试图添加子域到我的域名。 我刚刚在我干净的centos 7上安装了httpd。起初,我使用以下内容创build了文件/etc/httpd/conf.d/htmltest.mydomain.com.conf: <VirtualHost *:80> # Admin email, Server Name (domain name), and any aliases ServerAdmin [email protected] ServerName htmltest.mydomain.com DirectoryIndex index.html index.php DocumentRoot /www/sites/htmltest.mydomain.com/htdocs # Log file locations LogLevel warn ErrorLog /www/sites/htmltest.mydomain.com/log/error.log CustomLog /www/sites/htmltest.mydomain.com/log/access.log combined </VirtualHost> <Directory "/www/sites/htmltest.mydomain.com/htdocs"> Options Indexes FollowSymlinks AllowOverride None Require all granted </Directory> 另外/www/sites/htmltest.mydomain.com/htdocs文件夹是用index.html文件创build的。 有了这个configuration,我尝试访问htmltest.mydomain.com在浏览器中给出'服务器DNS地址无法find'的错误。 但是,mydomain.com会打开htmltest子域index.html。 在我的托pipeCP DNS设置有mydomain.com与htmltest'A'logging指向服务器IP,以及WWWlogging。 我怎样才能解决这个问题? UPD:我已经改变域使用vultr nameservers,它现在正常工作。
这里是我的情况:我有两个CNAME域( domain.one.com和domain.two.com )指向相同的IP /机器,我想redirect到另一个,如domain.one.com/anything到domain.two.com/anything 。 domain.two.com有一个有效的SSL证书。 我有以下设置: 在httpd.conf : RewriteCond %{HTTP_HOST} ^domain\.two\.com [NC] RewriteCond %{HTTP_HOST} !^$ RewriteRule ^/(.*) https://domain.two.com/$1 [L,R] NameVirtualHost *:80 NameVirtualHost domain.two.com:443 <VirtualHost *:80> ServerName domain.two.com DocumentRoot "/var/www/html/" ErrorLog logs/error_log CustomLog logs/access_log common RewriteEngine On RewriteOptions Inherit </VirtualHost> 在ssl.conf : <VirtualHost domain.two.com:443> DocumentRoot "/var/www/html" ServerName domain.two.com:443 </VirtualHost> – 我到目前为止所尝试的: 添加到httpd.conf中: NameVirtualHost domain.one.com:443 <VirtualHost […]
您好,我在同一台机器上运行多个应用程序,如使用ZOPE应用程序服务器在端口8080上运行的Plone和Tomcat托pipe多个Web应用程序并在端口8081上运行。 我想将所有传入的stream量从运行在端口80上的apache服务器redirect到这些服务器上,这样外部世界将只能看到apache的默认端口80.我尝试了许多configuration来做同样的事情,但是没有一个似乎在为两个服务器,但是,如果我正在configuration其工作完美无瑕。 所以,只有一个configuration正在使用,另一个没有效果。 我的configuration看起来像: Pastebin Link 我也尝试了以下configuration: <VirtualHost *:80> ServerName web.url.in ProxyPreserveHost On ProxyPass /MNCD2016 http://web.url.in:8081/MNCD2016 ProxyPassReverse /MNCD2016 http://web.url.in:8081/MNCD2016 RewriteEngine on RewriteRule ^/$ http://web.url.in/MNCD2016 </VirtualHost> <VirtualHost *:80> ServerName web.url.in ProxyPreserveHost On ProxyPass / http://web.url.in:8080/ ProxyPassReverse / http://web.url.in:8080/ RewriteEngine on RewriteRule ^/$ http://web.url.in/ckpw </VirtualHost> 问题是configuration只适用于任何一个端口而不是两个端口。 例如,如果Plone重写规则在上面,它将优先,其他tomcatconfiguration将不起作用。 单独他们工作顺利。 我怎样才能使他们同时工作的两个服务器(Zope,Tomcat)可能在未来甚至更多。 所以,我可以将所有传入的请求从Apache转移到这些服务器,外部世界应该只看到前面的Apache而不是这些服务器。 这是我为Ploneconfiguration所遵循的链接 。
我正在谷歌计算引擎上运行Apache,我按照这里的步骤: http : //www.groovypost.com/howto/apache/configure-apache-web-site-to-use-multiple-ports/ 使我的网站接受多个端口,而不是默认的端口80,但它似乎只适用于本地主机而不是我的IP地址: 我用telnet localhost 8080 ,它的工作原理,但为什么当我使用telnet <my-external-ip-address> 8080它不会工作。 我能知道为什么吗?
我有一个Linode服务器,我运行了超过30个网站! 今天,我想添加另一个网站,我在Apache2文件夹中的sites-available文件夹中创build了一个新的.conf文件。 启用它并重新启动我的Apache后,它似乎根本不起作用。 当去新configuration的域时,它会加载我以前启用的网站之一,而不是新的。 我通常复制一个旧的.conf文件来创build一个新的。 但是,如果这是我的.conf文件: # domain: bilitsaz.ir # public: /var/www/bilitsaz.ir/public_html/ <VirtualHost *:80> # Admin email, Server Name (domain name), and any aliases ServerAdmin [email protected] ServerName www.bilitsaz.ir ServerAlias bilitsaz.ir # Index file and Document Root (where the public files are located) DirectoryIndex index.html index.php DocumentRoot /var/www/bilitsaz.ir/public_html # Log file locations LogLevel warn ErrorLog /var/www/bilitsaz.ir/logs/error.log […]
(清漆-4.1.1修订版66bb824) 很多关于我的道歉,所以我很抱歉。 如果您需要使用具有不同要求的两个地点的清漆,那么最佳做法是什么? 我看到了如果陈述不明确的方法。 如果我所有的defaul.vcl包含的是一个包含specific.vcl的网站,那么这是行不通的。 我发现一个博客推荐重命名所有的sun vcl_例程并调用一个特定的vhost。 也许一个巨大的单片不可pipe理的configuration与if语句在每个v主机在每个子vcl_ 我感觉我错过了树林。 当然,一个“通用configuration”不可能处理所有情况? 我觉得我误解了这种情况,或者在一些严重的不合理的反模式(也许是两者)
我有一个Apache 2.4.23configuration,启用了mod_proxy / mod_proxy_balancer / mod_slotmem_shm / mod_lbmethod_byrequests。 此外,我有多个VirtualHost监听不同的端口,像这样的设置(PORT和COMPONENT是唯一的): Listen PORT <VirtualHost *:PORT> Include "eib/conf/default-proxy-params" ErrorLog "logs/PORT-COMPONENT-error.log" CustomLog "logs/PORT-COMPONENT-access.log" common <Proxy balancer://COMPONENT/> BalancerMember https://HOST1:PORT BalancerMember https://HOST2:PORT ProxySet lbmethod=byrequests </Proxy> ProxyPass / balancer://COMPONENT/ lbmethod=byrequests nofailover=Off maxattempts=3 ProxyPassReverse / balancer://COMPONENT/ </VirtualHost> 当我在我的configuration只有一个VirtualHost条目,一切工作正常。 只要我添加另一个VirtualHost,Apache崩溃configuration失败的错误: [Wed Oct 12 21:59:38.211829 2016] [slotmem_shm:error] [pid 4129010:tid 1] (24)Too many open files: AH02611: […]
我有一个使用Google Compute协议转发的Google Compute实例(Debian 8和Apache),可以在一个虚拟机实例中使用多个外部IP地址: Google计算协议转发(整篇文章) Google Compute Engine支持协议转发,它允许您创build可以将数据包发送到未经NAT的目标实例的转发规则对象。 每个目标实例都包含一个虚拟机实例,该虚拟机实例接收并处理来自相应转发规则的stream量。 问题 我无法通过端口443访问其中一个虚拟主机域/ IP。我需要这个,因为我想在所有这些域上启用HTTPS。 我已经尝试了多个选项来实现打开端口443,但他们都没有工作: 选项1)基于虚拟名称的主机: /etc/apache2/ports.conf Listen 80 <IfModule ssl_module> NameVirtualHost *:443 Listen 443 </IfModule> <IfModule mod_gnutls.c> NameVirtualHost *:443 Listen 443 </IfModule> /etc/apache2/sites-enabled/example.com.conf <VirtualHost *:80> ServerName example.com ServerAlias www.example.com DocumentRoot /var/www/website1 </VirtualHost> <VirtualHost *:443> ServerName example.com ServerAlias www.example.com DocumentRoot /var/www/website1 </VirtualHost> 选项2)基于虚拟IP的主机: /etc/apache2/ports.conf Listen 80 <IfModule […]