我有以下Apache虚拟主机将所有stream量redirect到网站的安全版本: <VirtualHost *:80> DocumentRoot "C:/Web/" ServerName site.local ErrorLog "C:/Webserv/Apache2.2/logs/site_error.log" CustomLog "C:/Webserv/Apache2.2/logs/site_access.log" combinedvh Redirect / https://site.local/ </VirtualHost> 我现在想从redirect中排除某些目录。 我试过了 <DirectoryMatch "!^C:/Web/myfolder/"> Redirect / https://site.local/ </DirectoryMatch> 但是没有什么是redirect的。 是否有捷径可寻? 我不想最终为每个子文件夹单独的redirect指令,特别是因为我也想redirect根文件夹。
我已经读过许多与亚马逊EC2相关的IP地址块已经被各个ISP列入黑名单。 因此,即使您不曾自己发送垃圾邮件,您从Amazon实例发送的电子邮件也会被标记为垃圾邮件,因为您正在与垃圾邮件的人共享资源。 我没有像EC2这样的虚拟/共享主机环境中的IP地址如何工作的正确的概念模型,也没有正确的黑名单过程如何解释自己如何发生。 有人能帮我理解这个吗?
我在Apache 2中有大约10个站点。这些都是独立的站点 – 不是子站点。 我有两个SSL证书,我想为他们build立SSL,而不是强迫我的非ssl站点使用任何证书。 我遇到的问题是我不能同时拥有两个证书,它总是默认为第一个,而不pipe我去哪个站点。 我一直在读这个,看起来像我的服务器可能支持SSI,Windows XP不支持它,所以这将不是一个可行的select。 另外,我简单地看了一下mod_gnutils,但是我不能保证这样做会达到我想要的效果,而且如果我不是绝对必须的话,我也不会很自在地做出所有必要的安装/configuration。 任何方向提供给我这个将不胜感激! 这里是两个443个虚拟主机。 我已经尝试引用虚拟主机,如下所示,以及其他变体,如简单的“和”。 我也玩过NameVirtualHost引用,但仍然无济于事。 Listen 443 NameVirtualHost www.site1.com:443 NameVirtualHost www.site2.com:443 <VirtualHost www.site1.com:443> DocumentRoot /var/www/site1/ ServerName www.site1.com:443 #SSL SSLEngine on SSLCertificateFile /path/to/ssl/site1.com.crt SSLCertificateKeyFile /path/to/ssl/site1.key SSLCertificateChainFile /path/to/ssl/bundle1.crt </VirtualHost> <VirtualHost www.site2.com:443> DocumentRoot /var/www/site2/ ServerName www.site2.com:443 #SSL SSLEngine on SSLCertificateFile /path/to/ssl/site2.com.crt SSLCertificateKeyFile /path/to/ssl/sit2.key SSLCertificateChainFile /path/to/ssl/bundle2.crt </VirtualHost>
我在nginx上运行了一些虚拟主机,我希望他们每个都有自己的404页面。 每个虚拟主机都有自己的nginx.conf,包含我的全局nginx.conf。 在特定虚拟主机的configuration文件中,我目前无法正常工作,configuration块如下所示: server{ listen 80; server_name www.foo.com; expires 1M; access_log /srv/www/foo/logs/acces.log; error_log /srv/www/foo/logs/error.log; error_page 404 /404.html; location / { root /srv/www/foo/public_html; index index.html; rewrite ^/(.*)/$ /$1 permanent; try_files "${uri}.html" $uri $uri/ =404; } location = /404.html { internal; } } 404'本身就没有问题,但是当404状态代码返回时,将显示默认的nginx 404页面,而不是显示在站点根目录下的自定义页面404.html。 我已经尝试通过文件系统和网站的URI到错误页面的绝对path,我试图把error_page指令放在位置块。 这些都没有工作。 我的怀疑是,问题来自我用来“美化”我的url的重写和try_files组合。
这是我迄今为止: <VirtualHost *:80> DocumentRoot "/PathToTheFilesThat/theserver/gives/access/to" ServerName docs.mysite.com ProxyPass / http://localhost:8808/ ProxyPassReverse / http://localhost:8808 </VirtualHost> 基本上,我只是想把YARD文档服务器公开给我工作的公司(而不是整个世界),因此需要基本的authentication。 以上目前允许从任何远程机器访问服务器…只需要身份validation。 = d 更新: <VirtualHost *:80> DocumentRoot "/Users/me/projects/myProject/doc" ServerName docs.mysite.com ProxyPass / http://localhost:8808/ ProxyPassReverse / http://localhost:8808 AuthUserFile /private/etc/apache2/conf/.htpasswd AuthName "Documentation Server, Please Log In" AuthType Basic Require User me </VirtualHost> 当我导航到docs.mysite.com(在控制台中)时会出现此错误 [Tue Feb 21 11:33:04 2012] [error] (61)Connection refused: proxy: […]
第一次在CentOs的LAMP和域设置。 以前的经验是在Ubuntu中。 在本地ISP的专用服务器上运行。 他们安装了默认的CentOs 6.2并将我的域redirect到服务器。 Ping mydomain.com可以正常工作以达到服务器的IP。 我已经使用这个howto解释在盒子上成功安装了LAMP。 一切似乎都很好。 我编辑了/ etc / hosts: 127.0.0.1 mydomain.com 我还编辑了/etc/httpd/conf/httpd.conf,并在文件末尾添加了以下内容,同时保持其余的默认值: NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot /var/www/html ServerName localhost </VirtualHost> <VirtualHost *:80> ServerName mydomain.com ServerAlias www.mydomain.com ServerAdmin [email protected] DocumentRoot /var/www/html/mydomain.com <Directory "/var/www/html/mydomain.com"> Options Includes FollowSymLinks AllowOverride All allow from all </Directory> ErrorLog /var/www/logs/mydopmain.com.default.log </VirtualHost> 而我也跑了 chmod -R apache:apache /var/www/html 作为最后的尝试去做事情。 […]
我刚刚得到一个linode帐户和一些域名。 有了这些原材料,我想要做的是: example.com — static hosting gitlab.example.com — install gitlab here dev.example.com — be able to install ruby stuff here another-domain.com — run a node server from here third-domain.com — run another node server from here 我只有Apache的经验,但我不知道如何将Apache与Node集成。 但是真的,我想知道做这个最好的方法是什么? 不要担心我是否知道这项技术 – 我会学习的!
我之前对vhosts没有任何问题,但由于某种原因,这不是指向正确的文档根目录。 该域指向正确的IP,Apache看到没有错误的网站configuration文件可用,但它只是没有指向正确。 这是该域的虚拟主机configuration: <VirtualHost *80> ServerAdmin [email protected] ServerName mydomain.info ServerAlias www.mydomain.info DirectoryIndex index.html DocumentRoot /var/www/vhosts/mydomain.info/htdocs LogLevel warn ErrorLog /var/www/vhosts/mydomain.info/log/error.log CustomLog /var/www/vhosts/mydomain.info/log/access.log combined </VirtualHost> 为了logging,我在Ubuntu 12.10上运行Apache2
我是新来的Apache和httpd.conf 我遇到的问题是我需要不同的网站去不同的虚拟主机configuration,如果只有IP被请求,它需要去根index.html 这适用于虚拟主机: <VirtualHost *:80> DocumentRoot /var/www/html/bali-accommodation.co ServerName www.bali-accommodation.co </VirtualHost> <VirtualHost *:80> DocumentRoot /var/www/html/balibeach.co ServerName www.balibeach.co </VirtualHost> <VirtualHost *:80> DocumentRoot /var/www/html/dating-website.co ServerName www.dating-website.co </VirtualHost> 但是,当我只是指定IP到www.XXX.XXX.XXX.XXX(追加www)。 我知道在网站有一个.htaccessredirect,增加了www,但我不希望IP进入虚拟主机configuration。 我试着把它添加到Vhostconfiguration的顶部: <VirtualHost *:80> DocumentRoot /var/www/html ServerName localhost </VirtualHost> 与上面它显示index.html完美,但所有的网站都进入这个捕获所有。 我也试过这个网站虚拟主机: DocumentRoot /var/www/html/bali-accommodation.co ServerName www.bali-accommodation.co 我已经尝试了上面有和没有在第一行'www'失败。 有没有办法让虚拟主机工作的域名,如果有人只是inputIP它去根index.html? /var/www/html/index.html? 谢谢你,亚当
我很抱歉,如果之前已经问过这个问题,但是我已经在这里看了很多问题,他们都没有回答我的问题。 我有一系列域指向我的服务器。 对于每一个我已经设置它的IPlogging,并正确地在http.conf中configuration一个VirtualHost,如下所示: # example.com <VirtualHost *:80> DocumentRoot /path/to/example ServerName example.com ServerAlias example.com ServerAlias www.example.com </VirtualHost> # other.com <VirtualHost *:80> DocumentRoot /path/to/other ServerName other.com ServerAlias other.com ServerAlias www.other.com </VirtualHost> 现在我在我的服务器上为test.other.com设置了一个IP,我想将其redirect到一个完全的其他网站:test.blogspot.com(因为它移动了)。 我尝试了以下,但它将所有网站redirect到该网站 # other.com <VirtualHost *:80> ServerName test.other.com ServerAlias test.other.com Redirect / http://test.blogspot.com/ </VirtualHost> 我想这是因为“/”? 不太确定。 我试过VirtualHost test.other.com:80但没有工作。 我尝试了一堆东西,没有工作,所以我真的需要你的帮助。 提前致谢。