upupw apache服务怎么设置https

今天使用upupw apache服务,怎么设置https。

找了好久,也查了一下资料,终于可以搞定了。


<VirtualHost *:80 *:443>

    DocumentRoot "网站存放路径"

ServerName 17sohu.com

    ServerAlias 17sohu.com www.17sohu.com

    ServerAdmin webmaster@17sohu.com

DirectoryIndex index.html index.php

ErrorLog logs/17sohu.com-error.log

CustomLog logs/17sohu.com-access_%Y%m%d.log comonvhost

    php_admin_value open_basedir "D:wwwooochsohu@com"

  SSLEngine on

    SSLEngine on

    SSLCertificateFile "存放路径/www.17sohu.com.crt"

    SSLCertificateKeyFile "存放路径/www.17sohu.com.key"

   SSLCertificateChainFile "存放路径/root_bundle.crt"   

    RewriteEngine on

    RewriteCond   %{HTTPS} !=on

    RewriteRule ^(.*)  https://%{SERVER_NAME}$1 [R=301,L]

<Directory "网站存放路径">

   Options FollowSymLinks

SSLOptions +StdEnvVars

    AllowOverride All

    Require all granted

</Directory>

<LocationMatch "/(attachment|attachments|uploadfiles)/(.*).(php|php5|php7|phps|asp|asp.net|jsp)$">

    Require all denied

</LocationMatch>

</VirtualHost>

12.png

参考如上设置!

THE END

文章版权:作者:一起守护  来源:本站  

TAG标签: https设置 upupw

免责声明:本站提供的一切文章和内容信息仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络收集整理,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑或手机中彻底删除上述内容。如果您喜欢该文章和内容,请支持正版,购买注册,得到更好的正版服务。我们非常重视版权问题,如有侵权请邮件与我们联系处理。敬请谅解!

本文最后更新于2023-11-02 20:06:18,如果你的问题还没有解决,可以加入交流群和群友们一起讨论。