Articles of 虚拟主机

select基于域名的SSL证书,无需单独的VHost

我正在使用具有各种顶级域名的WordPress多站点networking。 我们目前正在为他们提供一台虚拟主机: <VirtualHost *:80> ServerName example.com ServerAlias * DocumentRoot /var/www/html/example.com/public </VirtualHost> 随着Let's Encrypt今年晚些时候来临,我们希望为我们的客户提供免费的HTTPS。 使用这个服务,我们将能够自动获得每个域的证书。 我希望能够将Apacheconfiguration为在证书的特定文件夹中查找,以便在添加新证书时,我们的自动脚本不需要更改Apacheconfiguration。 <VirtualHost *:443> DocumentRoot /var/www/html/example.com/public ServerName example.com ServerAlias * SSLEngine on # This line should find the cert that corresponds to the requested domain SSLCertificateFile /etc/pki/tls/certs/*.crt SSLCertificateKeyFile /etc/pki/tls/private/example_com.key SSLCertificateChainFile /etc/pki/tls/certs/example_com.ca-bundle </VirtualHost> 可以将Apacheconfiguration为为所请求的域select正确的证书, 而不需要单独的虚拟主机或为每个虚拟主机configuration更改 ? 如果需要的话,我们可以转换Apache版本或者安装一个知名的Apache模块。

使用IPv6的Apache VirtualHost通配符

在Ubuntu上使用Apache 2.4,我在ports.conf中有以下内容: Listen XX.73.44.57:80 Listen [2001:XX:0:2c38::39]:80 <IfModule ssl_module> Listen XX.73.44.57:443 Listen [2001:XX:0:2c38::39]:443 </IfModule> <IfModule mod_gnutls.c> Listen XX.73.44.57:443 Listen [2001:XX:0:2c38::39]:443 </IfModule> 我想在我的服务器configuration中有以下内容: <VirtualHost *:80> 但是这似乎不能正常工作,因为主机没有回应。 我也试过: <VirtualHost *:80 [::]:80> 以下工作: <VirtualHost [2001:XX:0:2c38::39]:80 XX.73.44.57:80> 但我更喜欢通配符。 我必须明确地给出IP地址吗?

Vagrant上的Apache 2.4和Ubuntu 14.04错误:“您无权访问/在此服务器上。

我意识到在这里有很多类似的问题,但我一直在挣扎几个小时,一直无法find解决scheme。 当我尝试通过主机名shopwise.dev (设置到/etc/hosts中的Vagrant框的IP)访问我的Vagrant Ubuntu框时,出现以下错误页面: Forbidden You don't have permission to access / on this server. Apache/2.4.7 (Ubuntu) Server at shopwise.dev Port 80 我创build了文件/etc/apache2/sites-available/shopwise.conf : ServerName host.foxytronics.com NameVirtualHost *:80 <Directory /> Options FollowSymLinks AllowOverride All Require all granted </Directory> <Directory "/home/shopws/public_html"> Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted </Directory> <VirtualHost *:80> ServerAdmin [email protected] ServerName […]

ReverseProxy不适用于OSX El Capitan

我试图通过一个更干净的URL访问我的Plex Web UI。 目前,您可以访问http://marvin.boldlygoingnowhere.org:32400/web/index.html 。 我希望它在http://marvin.boldlygoingnowhere.org/plex inheritance人我有什么, 马文:〜马文$ httpd -v服务器版本: Apache/2.4.16 (Unix) Server built: Aug 22 2015 16:51:57 Server's Module Magic Number: 20120211:47 Server loaded: APR 1.4.8, APR-UTIL 1.5.2 Compiled using: APR 1.4.8, APR-UTIL 1.5.2 Architecture: 64-bit Server MPM: prefork threaded: no forked: yes (variable process count) Server compiled with…. -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D […]

用Apache VirtualHost保护Webmin

我试图设置我的webmin实例的地址https://webmin.example.com,但我得到一个内部服务器错误(500)。 任何想法为什么? 这是我的Apacheconfiguration: <VirtualHost *:443> ServerName webmin.example.com ServerAlias webmin.example.com <Proxy *> Order deny,allow Allow from all </Proxy> ProxyRequests Off ProxyPreserveHost On ProxyPass / https://127.0.0.1:10000/ ProxyPassReverse / https://127.0.0.1:10000/ SSLEngine on SSLCertificateFile /etc/apache2/ssl/server.pem SSLCertificateKeyFile /etc/apache2/ssl/server.key </VirtualHost> 这里是日志文件的内容: [ssl:error] [pid 21593] [remote 127.0.0.1:10000] AH01961: SSL Proxy requested for webmin.example.com:443 but not enabled [Hint: SSLProxyEngine] [proxy:error] [pid 21593] AH00961: […]

阿帕奇量子不确定性原理…如果指令是真的和假的

环境variables的值在bash中设置: # export PRODUCTION=true # echo $PRODUCTION # true 这里是我的虚拟主机文件的相关摘录: <If "-T osenv('PRODUCTION')"> Define dogs dogs </If> <Else> Define cats cats </Else> apache2ctl -S产生: Define: dogs=dogs Define: cats=cats 因此,我们有一个量子条件是真的和假的 。 这里发生了什么事情,如何使其正常运行? 我在这些引用中找不到任何内容,表明我做错了什么。 apache if-else Apache的庇护所运营商

如何使用mod_rewrite保证网站的一个页面安全

我想redirect访问从http到https的url只有我的网站几页。 我知道如何使用Apache虚拟主机中的重写整个网站: RewriteEngine On RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule (.*) https://%{SERVER_NAME}%{REQUEST_URI} 但有没有办法做到这一点的网站页面? 例如“www.example.com/protected-page”

在监狱环境中的Apache虚拟主机

我有一个chroot用户监狱环境的Linux服务器。 用户文件保存在 /jail/username/httpdocs 目前正在解决 http://IPADDRESS/~username 我需要用户能够设置自己的虚拟主机configuration,而不是使用全局apache2.conf,即用户将创build文件 /jail/username/vdomains/domain.com.conf 它会把他们的虚拟主机信息。 这可能吗?

ssl_error_handshake_failure_alert与基于商业CA的客户端证书

尝试使用SSL证书实现客户端身份validation。 http://www.modssl.org/docs/2.8/ssl_howto.html#auth-selective 收到以下错误。 Apache:重新协商握手失败:不被客户端接受! 火狐: ssl_error_handshake_failure_alert 我认为这是一个configuration错误,但一直无法find它。 附加信息:商业CA服务器证书服务器可以在Apache 2.2和Passenger中安全地工作。 只有客户端身份validation相关指令不起作用。

需要帮助设置本地主机

帮帮我! 我试图说服我的Apache指向localhost /Sites 。 我究竟做错了什么? httpd.conf设置 <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all </Directory> <VirtualHost *> DocumentRoot "/Users/username/Sites" ServerName localhost </VirtualHost> DocumentRoot指向/ Sites文件夹。 听80 NameVirtualHost * 越野车结果 10.0.0.4结果与/ Sites文件夹。 127.0.0.1也一样。 错误 : http:// localhost结果与/private/etc/apache2/…/htdocs