短网址平台 | Shortny v2.0.1源码搭建
宝塔国际版安装
yum install -y wget && wget -O install.sh http://www.aapanel.com/script/install_6.0_en.sh && bash install.sh aapanel Copy
4、添加网站并申请SSL证书
5、下载短网址源码: https://kod.5522770.xyz/#s/-Cv9rFHg
6、删除网站根目录文件并上次短网址源码,然后解压到当前目录
7、伪静态设置 一般宝塔面板是第二个NGINX
Apache,编辑.htaccess文件,将本地地址修改成自己的域名,比如:
RewriteEngine on RewriteRule ^about about.php [L] RewriteRule ^api-about api-about.php [L] RewriteRule ^contact contact.php [L] RewriteRule ^tos tos.php [L] RewriteRule ^([^/.]+)/?$ link.php?id=$1 [L] RewriteRule ^404 404.php [L] Options -Indexes ErrorDocument 404 http://你的域名/404 ErrorDocument 403 http://你的域名/404Copy
Nginx,点击域名设置-伪静态,然后将下面例子的域名改成自己的,再复制进去,比如:
rewrite ^/about /about.php last; rewrite ^/api-about /api-about.php last; rewrite ^/contact /contact.php last; rewrite ^/tos /tos.php last; rewrite ^/([^/.]+)/?$ /link.php?id=$1 last; rewrite ^/404 /404.php last; error_page 404 http://你的域名/404; error_page 403 http://你的域名/404;Copy
8、开始安装
安装完成后,默认用户名和密码均为admin
#安装路径,记得修改下面域名地址 https://你的域名/install/index.html #后台路径
视频教学:https://kod.5522770.xyz/#s/-D7YQBig