- 积分
- 16
- 威望
-
- 金钱
-
- 注册时间
- 2017-6-5
- 在线时间
- 小时
- 最后登录
- 1970-1-1
|
请问下军哥,lamp的http要统一跳转到https咋设置,论坛上都基本是清一色的lnmp的。但是nginx的和apache的conf文件好像不一样。设置出错。请教!
/usr/local/apache/conf/vhost/www.abc.com配置文件如下:
<VirtualHost *:80>
ServerAdmin admin@admin.cn
DocumentRoot "/home/wwwroot/www.abc.com"
ServerName www.abc.com
ServerAlias abc.com
ServerAlias abc.com
#ErrorLog "/home/wwwlogs/-error_log"
#CustomLog "/home/wwwlogs/-access_log" combined
<Directory "/home/wwwroot/www.abc.com">
SetOutputFilter DEFLATE
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex index.html index.php
</Directory>
DirectoryIndex index.html index.php
</Directory>
</VirtualHost>
<VirtualHost *:443>
ServerAdmin admin@admin.cn
php_admin_value open_basedir "/home/wwwroot/www.abc.com:/tmp/:/var/tmp/:/proc/"
DocumentRoot /home/wwwroot/www.abc.com
ServerName www.abc.com:443
ServerAlias abc.com
#ErrorLog "/home/wwwlogs/-error_log"
#CustomLog "/home/wwwlogs/-access_log" combined
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/www.abc.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.abc.com/privkey.pem
<Directory "/home/wwwroot/www.abc.com">
SetOutputFilter DEFLATE
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex index.html index.php
</Directory>
</VirtualHost>
[ 本帖最后由 810656823 于 2017-6-5 09:58 编辑 ] |
|