在一个ip和一个端口上服务多个域
Serve multiple domains on one ip and one port
我想在我的 CentOS 服务器上为多个域提供服务。
我在 http 上 运行 服务器。
现在我想 运行 这些服务器在 https 上。
我是这样写的ssl.conf
Listen 443
<VirtualHost *:443>
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/httpd/ssl/apache.crt
SSLCertificateKeyFile /etc/httpd/ssl/apache.key
SSLCertificateChainFile /etc/httpd/ssl/ca.crt
ServerName example.com:443
DocumentRoot "/var/www/html"
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/httpd/ssl/two.crt
SSLCertificateKeyFile /etc/httpd/ssl/two.key
SSLCertificateChainFile /etc/httpd/ssl/ca.crt
ServerName two.example.com:443
DocumentRoot /var/www/html/two
</VirtualHost>
但是没用。
我该怎么做?
谢谢。
就我而言,它工作正常。
Listen 443
<VirtualHost *:443>
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/httpd/ssl/apache.crt
SSLCertificateKeyFile /etc/httpd/ssl/apache.key
SSLCertificateChainFile /etc/httpd/ssl/ca.crt
ServerName example.com:443
DocumentRoot "/var/www/html"
</VirtualHost>
<VirtualHost *:443>
DocumentRoot /var/www/html/two
ServerName two.example.com
</VirtualHost>
我想在我的 CentOS 服务器上为多个域提供服务。 我在 http 上 运行 服务器。 现在我想 运行 这些服务器在 https 上。
我是这样写的ssl.conf
Listen 443
<VirtualHost *:443>
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/httpd/ssl/apache.crt
SSLCertificateKeyFile /etc/httpd/ssl/apache.key
SSLCertificateChainFile /etc/httpd/ssl/ca.crt
ServerName example.com:443
DocumentRoot "/var/www/html"
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/httpd/ssl/two.crt
SSLCertificateKeyFile /etc/httpd/ssl/two.key
SSLCertificateChainFile /etc/httpd/ssl/ca.crt
ServerName two.example.com:443
DocumentRoot /var/www/html/two
</VirtualHost>
但是没用。 我该怎么做?
谢谢。
就我而言,它工作正常。
Listen 443
<VirtualHost *:443>
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/httpd/ssl/apache.crt
SSLCertificateKeyFile /etc/httpd/ssl/apache.key
SSLCertificateChainFile /etc/httpd/ssl/ca.crt
ServerName example.com:443
DocumentRoot "/var/www/html"
</VirtualHost>
<VirtualHost *:443>
DocumentRoot /var/www/html/two
ServerName two.example.com
</VirtualHost>