在Apache中,我有一个使用ServerName host1.example.com设置的虚拟主机 在/ etc / hosts中有一个host1的入口 127.0.1.1 host1.example.com host1 并在/ etc /主机名 主机1 这是创buildFQDN的Debian / Ubuntu方式。 当为与服务器本身具有相同FQDN的虚拟主机提供内容时,Apache似乎有问题。 使用host1.example.com的虚拟主机运行nginx时,获取主机头并使用正确的虚拟主机没有任何问题。 但是当使用Apache时有问题,它总是使用000-default。 删除000-default使其切换到下一个虚拟主机,并删除除了我想要工作的域的虚拟主机文件,最终使它工作。 NameVirtualHost设置为* 日志中没有错误消息,没有重叠的虚拟主机,虚拟主机configuration是完全正确的。 <VirtualHost *> ServerAdmin webmaster@localhost ServerName host1.example.com DirectoryIndex index.php index.htm index.html DocumentRoot /var/www/host1.example.com <Directory /> Options FollowSymLinks Includes -Indexes AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> 有人有主意吗? 编辑: apache -t -D DUMP_VHOSTS输出: […]
我在一个内部networking上build立了一个networking服务器,运行在CentOS 5.5上,具有典型的LAMP设置。 当我在我的浏览器中,并指向http://mailroom/网页出现没有问题。 但是,当我尝试去一个子目录,我得到了403错误。 所以,我尝试设置虚拟主机指向subdomain.mailroom 。 当我点击子域时,即使我的.htaccess说不要,浏览器也会尝试添加到www上。 所以我的问题是… 1. Apache是否甚至可以识别没有TLD的东西? 2.如果需要顶级域名(TLD),我怎样才能设置一个假名,比如xxxxx.foo ?
我使用Apache前面的负载均衡器完全通过SSL运行站点,执行所有证书处理和解密。 我让HTTPstream量通过负载平衡器,以便Apache可以处理redirect。 当stream量redirect到HTTPS页面时,负载均衡器会解密并将请求转发到我想要的任何端口。 http – > load balancer:80 – > apache:80 – > 301 url:443 https – >负载平衡器:443 – encryptionstream量 – > apache:任何端口我想 我可以使用80以外的任何端口为我的所有虚拟主机,以避免redirect循环(端口444在下面的configuration工作正常),但为了在非生产环境的Apacheconfiguration之间的一致性我想知道如果我可以使用端口443尽pipeSSL实际上并未在Apache中启用,但对于VirtualHosts来说, 我以为我可以把SSLEngine off在<VirtualHost *:443>强制这个端口没有SSL,因为默认的SSL端口似乎尝试启用SSL,但Apache不启动这个configuration在Debian 6上。 (我已经注释掉/etc/apache2/ports.conf中的所有内容) [error] Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] 那么…我怎样才能使用禁用SSL的端口443? NameVirtualHost *:80 Listen 80 <VirtualHost *:80> # Force SSL RewriteEngine On RewriteCond %{HTTPS} […]
我在Debian服务器上安装了Redmine,但我不知道如何正确configurationApache2,以便Redmine文件夹的内容和Redmine的起始页面都不会显示为我的网站的主页。 假设该网站的url是www.myexample.com。 当前状态 www.myexample.com显示/var/www/redmine文件夹的文件 用符号链接/var/www/redmine -> /usr/local/lib/redmine-2.1/public/ 想要的状态 www.myexample.com应该是我通常的网站主页(例如显示index.html) www.redmine.myexample.com或www.myexample.com/redmine应显示redmine页面 我想这只是一个configuration问题,但我不知道这个问题。 所以这里是我的configuration文件。 你看到我在这里失踪了吗? /etc/apache2/httpd.conf <VirtualHost *:80> ServerName redmine.example.com DocumentRoot /var/www <Directory /var/www> AllowOverride all Options -MultiViews </Directory> </VirtualHost> 在/ etc / apache2的/网站可用/pipe理平台 <VirtualHost *:80> DocumentRoot /var/www/redmine <Directory /var/www/redmine> AllowOverride all Options -MultiViews RailsBaseURI /redmine </Directory> </VirtualHost> 在/ etc / apache2的/网站可用/默认 <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot […]
我的文件全部由apache拥有:apache。 所有目录有770个权限,文件有660个权限。 我原来的虚拟主机似乎很好,但第二个是在所有path上得到403错误。 这是我在/etc/httpd/conf/httpd.conf中的当前configuration <Directory "/var/www/site1"> Options Indexes FollowSymLinks AllowOverride All <IfModule mod_access.c> Order allow,deny Allow from all </IfModule> </Directory> <Directory "/var/www/site2"> Options Indexes FollowSymLinks AllowOverride All <IfModule mod_access.c> Order allow,deny Allow from all </IfModule> </Directory> <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/site1/ ServerName site1.domain.com ErrorLog /var/log/httpd/site1.error.log CustomLog /var/log/httpd/site1.access.log common </VirtualHost> <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot […]
我有域名example.com与子域名:www.example.com和a.example.com。 假设我不能购买通配符证书,但是我购买了example.com和www.example.com的证书。 现在我购买了a.example.com的证书。 该网站和它的子域位于同一个文件夹中,使用一个Apache vhost文件,并将子域定义为别名。 我可以将证书合并成一个文件吗? 如果我使用相同的密钥,csr文件来生成证书呢? 是唯一的解决scheme宣布在两个不同的虚拟主机的网站?
我正在尝试在openSUSE中为一个名为abc.com的站点设置Apache虚拟主机(仅用于示例目的)。 当我在浏览器上访问http://localhost/mysites/abc.com/index.html时,它会正确打开。 但是,当我访问http://abc.com ,它不会打开位于/files/htdocs/mysites/abc.com/index.html上的index.html文件。 相反,它打开了电视networking的网站。 这是我的configuration: default-server.conf : DocumentRoot "/files/htdocs" <Directory "/files/htdocs"> Options None AllowOverride All Order allow,deny Allow from all </Directory> NameVirtualHost 127.0.0.1 注意:我没有更改其他默认值。 vhost.conf vhosts.d/ httdp.conf包含在httdp.conf : <VirtualHost 127.0.0.1> DocumentRoot /files/htdocs/mysites/abc.com servername abc.com </VirtualHost> 有任何想法吗?
你有两个不同的IP地址不同的服务器。 两台服务器都是基于Apache的。 服务器A:已经托pipe一个网站( http://example.com ) 服务器B:将托pipe一个WordPress网站在服务器A的一个子目录( http://example.com/blog/ ) 这可能吗? 如果是这样,如何。 (我的背景:我对Apache服务器知之甚less。)
让我们说,我将有一个独特的开发服务器共享代码为多个开发人员。 每个开发人员的代码将在sources代码的主目录下,所以基本上就像~/<developer_name>/sources 。 该服务器正在运行Apache 2.4.x. 我需要每个开发者都可以通过<developer_name>.domain.com访问他们的代码。 当然,URL上的developer_name将匹配/home目录上的名称。 我的解决scheme是Apacheconfiguration上每个开发人员的虚拟主机,有没有更好的解决scheme,我不知道?
我最近为我的域购买了通配符SSL证书,生成了CSR,所有内容都通过OK发送。 我的问题是非常简单的,但遵循这个 – http://www.globalsign.com/support/install/install_apache.php ,我无法理解与什么相匹配的东西。 基本上 – 我有5个文件: – gs_intermediate_ca.crt – gs_root.pem – mydomain.com.crt – intermediate.pem – * .mydomain.com.key 价值: SSLCACertificateFile =? SSLCertificateChainFile =? SSLCertificateFile = mydomain.com.crt SSLCertificateKeyFile =? 我是新来的,任何帮助将不胜感激! 谢谢 编辑>>使用下面的答案! 干杯, 我现在收到以下错误: [错误]初始化:无法从文件/etc/apache2/domain.ssl/domain.ssl.crt/domain.com.crt读取服务器证书 [错误] SSL库错误:218529960错误:0D0680A8:asn1编码例程:ASN1_CHECK_TLEN:错误的标记 [错误] SSL库错误:218595386错误:0D07803A:asn1编码例程:ASN1_ITEM_EX_D2I:嵌套asn1错误 我的vHost现在看起来像这样: SSLCertificateFile /etc/apache2/domain.ssl/domain.ssl.crt/domain.com.crt SSLCertificateKeyFile /etc/apache2/domain.ssl/domain.ssl.key/domain.com.key SSLCertificateChainFile /etc/apache2/domain.ssl/ca.crt SSLCACertificateFile /etc/apache2/domain.ssl/gs_intermediate_ca.crt 任何想法,这些错误可以来自 – 有一个检查,我可以在.crt文件上运行? 亲切的问候