• 欢迎访问db1024网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏db1024吧

LNMP环境配置SSL证书最简单教程

主机教程 Liam 1年前 (2019-04-28) 458次浏览 17个评论 扫描二维码

现在腾讯提供免费的一年证书,地址:https://console.qcloud.com/ssl

nginx重定向http自动跳转https

server     {         listen 80;         server_name www.moerats.com;         index index.html index.htm index.php;         rewrite ^/(.*)$ https://www.moerats.com/$1 permanent;     } 

配置ssl证书

server     {         listen 443;         #listen [::]:80;         server_name www.moerats.com;         index index.html index.htm index.php;         root  /app;          ssl on;         ssl_certificate /ssl/www.moerats.com.crt; #ssl.crt文件位置         ssl_certificate_key /ssl/www.moerats.com.key;  #ssl.key文件位置          include typecho.conf;         #error_page   404   /404.html;         include enable-php-pathinfo.conf;          location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$         {             expires      30d;         }          location ~ .*.(js|css)?$         {             expires      12h;         }          location ~ /.         {             deny all;         }          access_log off;     } 

最后重启VPS即可。

提示:军哥现在的lnmp1.4可以直接添加ssl证书了。


db1024 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:LNMP环境配置SSL证书最简单教程
喜欢 (0)
关于作者:
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
(17)个小伙伴在吐槽
  1. What's up every one, here every one is sharing such know-how, so it's pleasant to read this weblog, and I used to go to see this webpage every day.
    Debra2020-09-14 15:38 回复 Windows XP | 360浏览器 JK
  2. Outstanding post however , I was wanting to know if you could write a litte more on this subject? I'd be very grateful if you could elaborate a little bit more. Kudos!
    зарегистрироваться 1xbet2020-09-10 01:25 回复 Windows 7 | Internet Explorer 10.0
  3. Hey There. I found your blog the usage of msn. This is a really neatly written article. I will make sure to bookmark it and return to read extra of your helpful info. Thanks for the post. I will certainly return.
    raymond2020-09-09 01:41 回复 Mac OS X | Chrome 65.0.3325.181
  4. Hi Dear, are you actually visiting this web site daily, if so afterward you will without doubt obtain pleasant knowledge.
    Jessica2020-09-08 08:23 回复 Linux | Firefox浏览器 60.0
  5. I was recommended this web site by my cousin. I am not sure whether this post is written by him as nobody else know such detailed about my problem. You're amazing! Thanks!
    LNMP环境配置SSL证书最简单教程 db1024 db10242020-09-06 23:56 回复 Mac OS X | Safari浏览器 605.1.15
  6. I don't even understand how I finished up here, but I assumed this put up was once great. I do not recognise who you are but certainly you are going to a well-known blogger in the event you are not already. Cheers!
    Jane2020-09-05 21:07 回复 Windows 7 | 360浏览器 SE
  7. You could certainly see your expertise within the work you write. The sector hopes for more passionate writers like you who are not afraid to mention how they believe. Always follow your heart.
    Patricia2020-08-28 04:03 回复 Windows XP | 360浏览器 JK
  8. Wow! Finally I got a blog from where I know how to in fact get helpful facts concerning my study and knowledge.
    Jeffrey2020-08-24 17:03 回复 Mac OS X | Chrome 66.0.3359.139
  9. Fantastic goods from you, man. I have understand your stuff previous to and you are just extremely fantastic. I actually like what you've acquired here, really like what you are saying and the way in which you say it. You make it entertaining and you still care for to keep it sensible. I can not wait to read much more from you. This is really a wonderful website.
    Linda2020-08-24 02:05 回复 Mac OS X | Chrome 53.0.2785.143
  10. Hello mates, how is everything, and what you want to say concerning this paragraph, in my view its really awesome in favor of me.
    Rose2020-08-23 06:25 回复 Linux | Chrome 66.0.3359.181
  11. I quite like reading through a post that can make people think. Also, thank you for allowing for me to comment!
    James2020-08-22 16:02 回复 Mac OS X | Chrome 53.0.2785.143
  12. Hello, Neat post. There is an issue with your web site in web explorer, might test this? IE nonetheless is the market chief and a large part of people will omit your great writing due to this problem.
    Ronald2020-08-20 17:22 回复 Linux | Firefox浏览器 52.9
  13. Good way of describing, and fastidious paragraph to take data about my presentation focus, which i am going to deliver in academy.
    Benjamin2020-08-20 03:57 回复 Linux | Firefox浏览器 54.0
  14. If you want to increase your know-how just keep visiting this web page and be updated with the latest news posted here.
    1xbet giriş2020-08-13 02:28 回复 Linux | 未知浏览器
  15. It's truly a great and useful piece of info. I am happy that you simply shared this useful information with us. Please stay us informed like this. Thank you for sharing.
    Stephen2020-08-12 02:36 回复 Linux | Chrome 61.0.3116.0
  16. I truly love your blog.. Excellent colors & theme. Did you develop this web site yourself? Please reply back as I'm planning to create my very own website and would love to find out where you got this from or exactly what the theme is called. Cheers!
    Michelle2020-08-04 23:54 回复 Linux | Chrome 66.0.3359.139
  17. This article offers clear idea for the new people of blogging, that genuinely how to do blogging.
    Royal CBD2020-05-14 21:28 回复 Windows 8.1 | Chrome 67.0.3396.79