Re在 Windows 2008 系统为 phpstudy apache 不同网站配置不同SSL证书(SNI)
大神在吗
#LoadModule ssl_module modules/mod_ssl.so (如果找不到请确认是否编译过 openssl 插件)
#Include conf/extra/httpd-ssl.conf
这两句话的#我已经去掉了
-------------------------
Re在 Windows 2008 系统为 phpstudy apache 不同网站配置不同SSL证书(SNI)
接87楼
<VirtualHost *:443>
# 添加 SSL 协议支持协议,去掉不安全的协议
SSLProtocol all -SSLv2 -SSLv3
# 修改加密套件如下
SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM
SSLHonorCipherOrder on
# 证书公钥配置
SSLCertificateFile conf/ssl/cert/public.pem
# 证书私钥配置
SSLCertificateKeyFile conf/ssl/cert/214277396730467.key
# 证书链配置,如果该属性开头有 '#'字符,请删除掉
SSLCertificateChainFile conf/ssl/cert/chain.pem
</VirtualHost>
##
## SSL Virtual Host Context
##
#<VirtualHost *:443>
# SSLEngine on
# SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
# SSLCertificateFile "D:\phpStudy\Apache\conf\ssl\cert\214277396730467.pem"
# SSLCertificateKeyFile "D:\phpStudy\Apache\conf\ssl\cert\214277396730467.key"
# ServerName "www.网址.cn"
# DocumentRoot "D:\shengyuanV19"
#</VirtualHost>
已经启动了,但是https的网址打不开,http可以
-------------------------
回 89楼dongshan8的帖子
您好,
我88楼发的第一部分是根据阿里云提示操作的,第二部分是按你的提示操作,这两个办法都试过了
-------------------------
回 89楼dongshan8的帖子
在线等 谢谢
-------------------------
Re回 92楼dongshan8的帖子
第一个域名端口是443,其他都是80
-------------------------
Re回 93楼aaaaa11123的帖子
-------------------------
Re回 94楼aaaaa11123的帖子
-------------------------
回 96楼dongshan8的帖子
tcp 0.0.0.0.443 0.0.0.0.0 listening 3792
-------------------------
回 92楼dongshan8的帖子
[Thu Oct 12 20:54:05.187500 2017] [core:error] [pid 2472:tid 1672] (20024)The given path is misformatted or contained invalid characters: [client 140.205.225.185:53194] AH00127: Cannot map GET /'%22/></script><script>alert()</script> HTTP/1.1 to file, referer: 域名/
[Thu Oct 12 20:54:51.796875 2017] [core:error] [pid 2472:tid 1672] (20024)The given path is misformatted or contained invalid characters: [client 140.205.225.185:16085] AH00127: Cannot map GET /'%22/></script><script>alert()</script>/?.tmp=t HTTP/1.1 to file, referer: 域名/
[Thu Oct 12 20:56:58.562500 2017] [core:error] [pid 2472:tid 1668] (20024)The given path is misformatted or contained invalid characters: [client 140.205.225.185:56444] AH00127: Cannot map GET /'%22+onmouseover=alert()+d='%22 HTTP/1.1 to file, referer: http://yunying.shanxiwap.cn/
[Thu Oct 12 20:57:02.781250 2017] [core:error] [pid 2472:tid 1668] (20024)The given path is misformatted or contained invalid characters: [client 140.205.225.185:56444] AH00127: Cannot map GET /%27%22%20onmouseover%3Dalert%28%29%20d%3D%27%22 HTTP/1.1 to file, referer: http://yunying.shanxiwap.cn/
[Thu Oct 12 20:57:06.234375 2017] [core:error] [pid 2472:tid 1676] (20024)The given path is misformatted or contained invalid characters: [client 140.205.225.185:57298] AH00127: Cannot map GET /'%22+onmouseover=alert()+d='%22/?.tmp=t HTTP/1.1 to file, referer: 域名/
[Thu Oct 12 20:57:08.390625 2017] [core:error] [pid 2472:tid 1676] (20024)The given path is misformatted or contained invalid characters: [client 140.205.225.185:57298] AH00127: Cannot map GET /%27%22%20onmouseover%3Dalert%28%29%20d%3D%27%22/?.tmp=t HTTP/1.1 to file, referer: http://yunying.shanxiwap.cn/
[Thu Oct 12 20:57:12.562500 2017] [core:error] [pid 2472:tid 1676] (20024)The given path is misformatted or contained invalid characters: [client 140.205.225.185:57298] AH00127: Cannot map GET /'%22/></script><script>alert()</script> HTTP/1.1 to file, referer: http://yunying.shanxiwap.cn/
[Thu Oct 12 20:57:20.156250 2017] [core:error] [pid 2472:tid 1676] (20024)The given path is misformatted or contained invalid characters: [client 140.205.225.185:57298] AH00127: Cannot map GET /'%22/></script><script>alert()</script>/?.tmp=t HTTP/1.1 to file, referer: 域名/
[Thu Oct 12 20:57:35.578125 2017] [core:error] [pid 2472:tid 1672] (20024)The given path is misformatted or contained invalid characters: [client 140.205.225.185:7717] AH00127: Cannot map GET /'%22+onmouseover=alert()+d='%22 HTTP/1.1 to file, referer: 域名/
[Thu Oct 12 20:57:36.093750 2017] [core:error] [pid 2472:tid 1672] (20024)The given path is misformatted or contained invalid characters: [client 140.205.225.185:7717] AH00127: Cannot map GET /%27%22%20onmouseover%3Dalert%28%29%20d%3D%27%22 HTTP/1.1 to file, referer: 域名/
[Thu Oct 12 20:57:37.078125 2017] [core:error] [pid 2472:tid 1672] (20024)The given path is misformatted or contained invalid characters: [client 140.205.225.185:7717] AH00127: Cannot map GET /'%22+onmouseover=alert()+d='%22/?.tmp=t HTTP/1.1 to file, referer: http://shanxiwap.cn/
[Thu Oct 12 20:57:37.562500 2017] [core:error] [pid 2472:tid 1672] (20024)The given path is misformatted or contained invalid characters: [client 140.205.225.185:7717] AH00127: Cannot map GET /%27%22%20onmouseover%3Dalert%28%29%20d%3D%27%22/?.tmp=t HTTP/1.1 to file, referer: 域名/
[Thu Oct 12 20:57:38.562500 2017] [core:error] [pid 2472:tid 1672] (20024)The given path is misformatted or contained invalid characters: [client 140.205.225.185:7717] AH00127: Cannot map GET /'%22/></script><script>alert()</script> HTTP/1.1 to file, referer: 域名/
[Thu Oct 12 20:57:40.093750 2017] [core:error] [pid 2472:tid 1672] (20024)The given path is misformatted or contained invalid characters: [client 140.205.225.185:7717] AH00127: Cannot map GET /'%22/></script><script>alert()</script>/?.tmp=t HTTP/1.1 to file, referer: 域名/
-------------------------
回 98楼aaaaa11123的帖子
[Fri Oct 13 10:22:44.062500 2017] [mpm_winnt:notice] [pid 1480:tid 464] AH00455: Apache/2.4.10 (Win32) OpenSSL/0.9.8zb mod_fcgid/2.3.9 configured -- resuming normal operations
[Fri Oct 13 10:22:44.062500 2017] [mpm_winnt:notice] [pid 1480:tid 464] AH00456: Apache Lounge VC9 Server built: Jul 19 2014 13:20:51
[Fri Oct 13 10:22:44.062500 2017] [core:notice] [pid 1480:tid 464] AH00094: Command line: 'D:\\phpStudy\\Apache\\bin\\httpd.exe -d D:/phpStudy/Apache'
[Fri Oct 13 10:22:44.078125 2017] [mpm_winnt:notice] [pid 1480:tid 464] AH00418: Parent: Created child process 3068
[Fri Oct 13 10:22:44.609375 2017] [mpm_winnt:notice] [pid 3068:tid 656] AH00354: Child: Starting 150 worker threads.
[Fri Oct 13 10:23:49.156250 2017] [mpm_winnt:crit] [pid 3068:tid 656] AH02538: Child: Parent process exited abruptly. Child process is ending
Starting the Apache2a service
The Apache2a service is running.
[core:warn] [pid 2096:tid 464] AH00098: pid file D:/phpStudy/Apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Fri Oct 13 10:23:50.921875 2017] [mpm_winnt:notice] [pid 2096:tid 464] AH00455: Apache/2.4.10 (Win32) OpenSSL/0.9.8zb mod_fcgid/2.3.9 configured -- resuming normal operations
[Fri Oct 13 10:23:50.921875 2017] [mpm_winnt:notice] [pid 2096:tid 464] AH00456: Apache Lounge VC9 Server built: Jul 19 2014 13:20:51
[Fri Oct 13 10:23:50.921875 2017] [core:notice] [pid 2096:tid 464] AH00094: Command line: 'D:\\phpStudy\\Apache\\bin\\httpd.exe -d D:/phpStudy/Apache'
[Fri Oct 13 10:23:50.921875 2017] [mpm_winnt:notice] [pid 2096:tid 464] AH00418: Parent: Created child process 4976
[Fri Oct 13 10:23:51.437500 2017] [mpm_winnt:notice] [pid 4976:tid 656] AH00354: Child: Starting 150 worker threads.
-------------------------
回 100楼dongshan8的帖子
<VirtualHost _default_:9096>
DocumentRoot "D:\phpStudy\WWW"
<Directory "D:\phpStudy\WWW">
Options +Indexes +FollowSymLinks +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:443>
DocumentRoot "D:\shengyuanV19"
ServerName www.域名1.cn
ServerAlias
<Directory "D:\shengyuanV19">
Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "D:\shengyuanV19"
ServerName 域名2.cn
ServerAlias
<Directory "D:\shengyuanV19">
Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "D:\shengyuanV19"
ServerName wx.域名3.cn
ServerAlias
<Directory "D:\shengyuanV19">
Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "D:\msf\weimi"
ServerName weixin.域名4.cn
ServerAlias
<Directory "D:\msf\weimi">
Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "D:\msf\site"
ServerName site.域名5.net
ServerAlias
<Directory "D:\msf\site">
Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "D:\msf\case"
ServerName case.域名6.net
ServerAlias
<Directory "D:\msf\case">
Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "D:\msf\Editor\wwwroot"
ServerName e.域名7.cn
ServerAlias
<Directory "D:\msf\Editor\wwwroot">
Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "D:\yunying\qyws"
ServerName yunying.域名8.cn
ServerAlias www.sxqyws.net
<Directory "D:\yunying\qyws">
Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
域名1就是我要加https的网站,在线等,好人一生平安
-------------------------
回 101楼aaaaa11123的帖子
#
# This is the Apache server configuration file providing SSL support.
# It contains the configuration directives to instruct the server how to
# serve pages over an https connection. For detailed information about these
# directives see <URL:http://httpd.apache.org/docs/trunk/mod/mod_ssl.html>
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
#
# Pseudo Random Number Generator (PRNG):
# Configure one or more sources to seed the PRNG of the SSL library.
# The seed data should be of good random quality.
# WARNING! On some platforms /dev/random blocks if not enough entropy
# is available. This means you then cannot use the /dev/random device
# because it would lead to very long connection times (as long as
# it requires to make more entropy available). But usually those
# platforms additionally provide a /dev/urandom device which doesn't
# block. So, if available, use this one instead. Read the mod_ssl User
# Manual for more details.
#
#SSLRandomSeed startup file:/dev/random 512
#SSLRandomSeed startup file:/dev/urandom 512
#SSLRandomSeed connect file:/dev/random 512
#SSLRandomSeed connect file:/dev/urandom 512
#
# When we also provide SSL we have to listen to the
# standard HTTP port (see above) and to the HTTPS port
#
# Note: Configurations that use IPv6 but not IPv4-mapped addresses need two
# Listen directives: "Listen [::]:443" and "Listen 0.0.0.0:443"
#
Listen 443
##
## SSL Global Context
##
## All SSL configuration in this context applies both to
## the main server and all SSL-enabled virtual hosts.
##
# Pass Phrase Dialog:
# Configure the pass phrase gathering process.
# The filtering dialog program (`builtin' is a internal
# terminal dialog) has to provide the pass phrase on stdout.
SSLPassPhraseDialog builtin
# Inter-Process Session Cache:
# Configure the SSL Session Cache: First the mechanism
# to use and second the expiring timeout (in seconds).
#SSLSessionCache "dbm:/Apache24/logs/ssl_scache"
SSLSessionCache "shmcb:/Apache24/logs/ssl_scache(512000)"
SSLSessionCacheTimeout 300
<VirtualHost *:443>
# 添加 SSL 协议支持协议,去掉不安全的协议
SSLProtocol all -SSLv2 -SSLv3
# 修改加密套件如下
SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM
SSLHonorCipherOrder on
# 证书公钥配置
SSLCertificateFile conf/ssl/cert/public.pem
# 证书私钥配置
SSLCertificateKeyFile conf/ssl/cert/214277396730467.key
# 证书链配置,如果该属性开头有 '#'字符,请删除掉
SSLCertificateChainFile conf/ssl/cert/chain.pem
</VirtualHost>
##
## SSL Virtual Host Context
##
#<VirtualHost *:443>
# SSLEngine on
# SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
# SSLCertificateFile "D:\phpStudy\Apache\conf\ssl\cert\214277396730467.pem"
# SSLCertificateKeyFile "D:\phpStudy\Apache\conf\ssl\cert\214277396730467.key"
# ServerName "www.shanxiwap.cn"
# DocumentRoot "D:\shengyuanV19"
#</VirtualHost>
这段是httpd-ssl.conf的配置
-------------------------
回 103楼dongshan8的帖子
您好,我已将vhost.conf的注释如下:
#<VirtualHost *:443>
# DocumentRoot "D:\shengyuanV19"
# ServerName 我的域名
# ServerAlias
# <Directory "D:\shengyuanV19">
# Options FollowSymLinks ExecCGI
# AllowOverride All
# Order allow,deny
# Allow from all
# Require all granted
# </Directory>
#</VirtualHost>
以下是httpd-ssl.conf的配置
#
# This is the Apache server configuration file providing SSL support.
# It contains the configuration directives to instruct the server how to
# serve pages over an https connection. For detailed information about these
# directives see <URL:http://httpd.apache.org/docs/trunk/mod/mod_ssl.html>
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
#
# Pseudo Random Number Generator (PRNG):
# Configure one or more sources to seed the PRNG of the SSL library.
# The seed data should be of good random quality.
# WARNING! On some platforms /dev/random blocks if not enough entropy
# is available. This means you then cannot use the /dev/random device
# because it would lead to very long connection times (as long as
# it requires to make more entropy available). But usually those
# platforms additionally provide a /dev/urandom device which doesn't
# block. So, if available, use this one instead. Read the mod_ssl User
# Manual for more details.
#
#SSLRandomSeed startup file:/dev/random 512
#SSLRandomSeed startup file:/dev/urandom 512
#SSLRandomSeed connect file:/dev/random 512
#SSLRandomSeed connect file:/dev/urandom 512
#
# When we also provide SSL we have to listen to the
# standard HTTP port (see above) and to the HTTPS port
#
# Note: Configurations that use IPv6 but not IPv4-mapped addresses need two
# Listen directives: "Listen [::]:443" and "Listen 0.0.0.0:443"
#
Listen 443
##
## SSL Global Context
##
## All SSL configuration in this context applies both to
## the main server and all SSL-enabled virtual hosts.
##
# Pass Phrase Dialog:
# Configure the pass phrase gathering process.
# The filtering dialog program (`builtin' is a internal
# terminal dialog) has to provide the pass phrase on stdout.
SSLPassPhraseDialog builtin
# Inter-Process Session Cache:
# Configure the SSL Session Cache: First the mechanism
# to use and second the expiring timeout (in seconds).
#SSLSessionCache "dbm:/Apache24/logs/ssl_scache"
SSLSessionCache "shmcb:/Apache24/logs/ssl_scache(512000)"
SSLSessionCacheTimeout 300
#<VirtualHost *:443>
# 添加 SSL 协议支持协议,去掉不安全的协议
# SSLProtocol all -SSLv2 -SSLv3
# 修改加密套件如下
# SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM
# SSLHonorCipherOrder on
# 证书公钥配置
# SSLCertificateFile conf/ssl/cert/public.pem
# 证书私钥配置
# SSLCertificateKeyFile conf/ssl/cert/214277396730467.key
# 证书链配置,如果该属性开头有 '#'字符,请删除掉
# SSLCertificateChainFile conf/ssl/cert/chain.pem
#</VirtualHost>
##
## SSL Virtual Host Context
##
#<VirtualHost *:443>
# SSLEngine on
# SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
# SSLCertificateFile "D:\phpStudy\Apache\conf\ssl\cert\214277396730467.pem"
# SSLCertificateKeyFile "D:\phpStudy\Apache\conf\ssl\cert\214277396730467.key"
# ServerName "www.shanxiwap.cn"
# DocumentRoot "D:\shengyuanV19"
#</VirtualHost>
<VirtualHost *:443>
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
SSLCertificateFile "D:\phpStudy\Apache\conf\ssl\cert\214277396730467.pem"
SSLCertificateKeyFile "D:\phpStudy\Apache\conf\ssl\cert\214277396730467.key"
DocumentRoot "D:\shengyuanV19"
ServerName "我的域名"
ServerAlias
<Directory "D:\shengyuanV19">
Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
-------------------------
回 103楼dongshan8的帖子
您好,vhost.conf里有8个域名,其中前三个是绑定的一个路径,第一个是主域名(加https) 第二个是不带www的主域名,第三个是二级域名
我刚才注释的vhost.conf是
#<VirtualHost *:443>
# DocumentRoot "D:\shengyuanV19"
# ServerName 主域名
# ServerAlias
# <Directory "D:\shengyuanV19">
# Options FollowSymLinks ExecCGI
# AllowOverride All
# Order allow,deny
# Allow from all
# Require all granted
# </Directory>
#</VirtualHost>
第二个第三个没有动
-------------------------
回 103楼dongshan8的帖子
方便的话 加个qq您远程控制我的桌面看看 1003521946 谢谢
-------------------------
回 107楼dongshan8的帖子
还是只能访问http站点
-------------------------
回 109楼dongshan8的帖子
现在可以在ecs服务器可以打开https网址了, 在本地访问不可以
-------------------------
回 112楼dongshan8的帖子
老师你好:
我在公网入方向添加自定义443 0.0.0.0/0
还是不行
-------------------------
Re回 114楼dongshan8的帖子
老师您看看
-------------------------
Re回 116楼dongshan8的帖子
防火墙也关的了
-------------------------
Re回 116楼dongshan8的帖子
服务器进程图
-------------------------
回 119楼dongshan8的帖子
在服务器 用https://域名和https://ip都可以打开