标签:proc example data cer director directory ica thinkphp this
去阿里云盾申请 成功后下载 有三个文件******.com_public.crt ******.com.key *******.com_chain.crt
Apache安装配置SSL证书方法教程(普通版)
https://www .wosign.com/support/ssl-Apache1.htm
把正书放在了/usr/local/apache/conf/ssl 里面(自己创建的ssl)
修改了/usr/local/apache/conf/extra下面的httpd-vhosts.conf
<VirtualHost *:443>
ServerAdmin webmaster@example.com
#php_admin_value open_basedir "/home/wwwroot/xthinkphp:/tmp/:/var/tmp/:/proc/"
DocumentRoot /home/wwwroot/xthinkphp
ServerName x.acg170.com
SSLEngine On
SSLOptions +StrictRequire
SSLCertificateFile /usr/local/apache/conf/ssl/******.com_public.crt
SSLCertificateKeyFile /usr/local/apache/conf/ssl/******.com.key
SSLCertificateChainFile /usr/local/apache/conf/ssl/*******.com_chain.crt
<Directory "/home/wwwroot/xthinkphp">
SetOutputFilter DEFLATE
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex index.html index.php
</Directory>
</VirtualHost>
#路径(/home/wwwroot/xthinkphp)一定要写对 我报了You don‘t have permission to access /getdata/wx_data/p/1 on this server.
Apache Server at x.acg170.com Port 443
找了半天在https://blog.csdn.net/tianlianchao1982/article/details/6161308收到启发路径错了然后就ok了
修改项目中.htaccess文件
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
RewriteBase /
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^.* https://%{SERVER_NAME}%{REQUEST_UR} [L,R]
</IfModule>
标签:proc example data cer director directory ica thinkphp this
原文地址:https://www.cnblogs.com/yang1022/p/10076043.html