SwnoRabbit全家桶-网站创建

网站开始创建

安装 laravel

# 安装
composer global require laravel/installer
# 创建项目
composer create-project --prefer-dist laravel/laravel SnowRabbit

创建 GitHub 账号

snowrabbit-top

创建代码库

ssh :  git@github.com:snowrabbit-top/snowrabbit.git
https :  https://github.com/snowrabbit-top/snowrabbit.git

上传代码

git init
git add .
git commit -m '项目创建'
git branch -M master
git remote add origin https://github.com/snowrabbit-top/snowrabbit.git
git push -u origin master

解析网站域名

# 主站
www.snowrabbit.top
# 后台
admin.snowrabbit.top
# 新闻
news.snowrabbit.top
# 视频
video.snowrabbit.top
# 小说
novel.snowrabbit.top
# 音乐
music.snowrabbit.top
# 漫画
cartoon.snowrabbit.top
# 游戏
game.snowrabbit.top
# 论坛
forum.snowrabbit.top

购买域名证书

# 阿里云免费 SSL 证书购买
https://common-buy.aliyun.com/?spm=5176.2020520163.0.0.512556a7i9MAm0&commodityCode=cas
# 证书下载
https://yundun.console.aliyun.com/?spm=5176.6660585.774526198.1.40cf6bf8c2gTBi&p=cas#/overview/cn-hangzhou

配置域名证书

<VirtualHost *:443>     
    ServerName   www.snowrabbit.top
    DocumentRoot  /snowrabbit/public/ # 这个目录一定得是项目访问目录
    SSLEngine on   
    SSLProtocol all -SSLv2 -SSLv3
    SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM
    SSLHonorCipherOrder on
    SSLCertificateFile www.snowrabbit.top_public.crt # 绝对路径
    SSLCertificateKeyFile www.snowrabbit.top.key # 绝对路径
    SSLCertificateChainFile www.snowrabbit.top_chain.crt #绝对路径
</VirtualHost>

配置 hosts 文件

# snowrabbit.top
127.0.0.1        www.snowrabbit.top
127.0.0.1        admin.snowrabbit.top
127.0.0.1        news.snowrabbit.top
127.0.0.1        video.snowrabbit.top
127.0.0.1        novel.snowrabbit.top
127.0.0.1        music.snowrabbit.top
127.0.0.1        cartoon.snowrabbit.top
127.0.0.1        game.snowrabbit.top
127.0.0.1        forum.snowrabbit.top

访问成功

访问成功

本作品采用《CC 协议》,转载必须注明作者和本文链接
月冰华
《L05 电商实战》
从零开发一个电商项目,功能包括电商后台、商品 & SKU 管理、购物车、订单管理、支付宝支付、微信支付、订单退款流程、优惠券等
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
讨论数量: 1
hareluya

500了。。。 BTW,SSL可以考虑用certbot.org....

3年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!