时间:2023-02-17 04:04:01 | 来源:建站知识
时间:2023-02-17 04:04:01 来源:建站知识
Include conf/extra/httpd-vhosts.confLoadModule proxy_module modules/mod_proxy.soLoadModule proxy_ajp_module modules/mod_proxy_ajp.soLoadModule proxy_balancer_module modules/mod_proxy_balancer.soLoadModule proxy_connect_module modules/mod_proxy_connect.soLoadModule proxy_http_module modules/mod_proxy_http.soLoadModule slotmem_shm_module modules/mod_slotmem_shm.so
接下来配置网站。video.fuyeor.com 做示例[2]#配置一个virtualHost<VirtualHost *:80> ServerName video.fuyeor.com ProxyRequests OffProxyPreserveHost On <Proxy /> Order deny,allow Allow from all </Proxy> ProxyPass / #此处填写你的域名+端口,同下# ProxyPassReverse / #此处填写你的域名+端口, 如fuyeor:81#</VirtualHost>
示例。<VirtualHost *:80> ServerName video.fuyeor.com ProxyRequests OffProxyPreserveHost On <Proxy /> Order deny,allow Allow from all </Proxy> ProxyPass / http://fuyeor.com:90 ProxyPassReverse / http://fuyeor.com:90</VirtualHost>
开启 https 设置。[3]SSLEngine on #开启SSLSSLProxyEngine OnSSLProxyVerify noneSSLCertificateFile "C:/SSL证书路径/ video.fuyeor.com _public.crt" #公匙证书SSLCertificateKeyFile "C:/SSL证书路径/ video.fuyeor.com .key" #私匙证书SSLCertificateChainFile "C:/SSL证书路径/ video.fuyeor.com _chain.crt" #域名证书
并将HTTP重定向到相应的HTTPS站点:<VirtualHost *:80>ServerName video.fuyeor.comRewriteEngine onRewriteRule ^(.*)?$ https://video.fuyeor.com $1 [R=301,L]</VirtualHost>
#1、将 80端口的 video.fuyeor.com 重定向到 443端口#即将 http://video.fuyeor.com 重定向到 https://video.fuyeor.com<VirtualHost *:80>ServerName video.fuyeor.comRewriteEngine onRewriteRule ^(.*)?$ https://video.fuyeor.com $1 [R=301,L]</VirtualHost>#将端口转发到域名 video.fuyeor.com<VirtualHost *:443> ServerName video.fuyeor.com ProxyRequests OffProxyPreserveHost OnSSLEngine onSSLProxyEngine OnSSLProxyVerify noneSSLCertificateFile "C:/SSL证书路径/ video.fuyeor.com _public.crt" #公匙证书SSLCertificateKeyFile "C:/SSL证书路径/ video.fuyeor.com .key" #私匙证书SSLCertificateChainFile "C:/SSL证书路径/ video.fuyeor.com _chain.crt" #域名证书 <Proxy /> Order deny,allow Allow from all </Proxy> ProxyPass / http://fuyeor.com:90 ProxyPassReverse / http://fuyeor.com:90</VirtualHost>
关键词:配置,独立