# 星哥说事导航www.xgss.net **Repository Path**: funet8/www.xgss.net ## Basic Information - **Project Name**: 星哥说事导航www.xgss.net - **Description**: www.xgss.net 原版来自:https://github.com/hui-ho/WebStack-Laravel.git - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-08-16 - **Last Updated**: 2022-05-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # WebStack-Laravel介绍 一个开源的网址导航网站项目,具备完整的前后台,您可以拿来制作自己的网址导航。 项目来源: https://github.com/hui-ho/WebStack-Laravel.git ![首页](public/screen/01.png) # 部署 前提:服务器需要有安装PHP和composer,mysql5.7,nginx环境,安装省略 ``` # php -v PHP 7.3.7 (cli) (built: Aug 31 2020 15:29:09) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.7, Copyright (c) 1998-2018 Zend Technologies # composer --version Composer version 2.0.13 2021-04-27 13:11:08 # nginx -v nginx version: nginx/1.16.1 ``` 克隆代码: ```shell git clone https://gitee.com/funet8/www.xgss.net.git ``` 安装依赖: ```shell $ composer install $ composer install (由于会报错) [www@node5 www.xgss.net]$ composer install Installing dependencies from lock file (including require-dev) Verifying lock file contents can be installed on current platform. Your lock file does not contain a compatible set of packages. Please run composer update. Problem 1 - symfony/thanks is locked to version v1.1.0 and an update of this package was not requested. - symfony/thanks v1.1.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.1.0] but it does not match the constraint. $ composer update $ composer install 安裝成功登錄後台會有,無限重定向(检测到该服务器正在将指向此网址的请求无限循环重定向) 確定是 vendor目錄的問題 重新下載 http://js.funet8.com/file/vendor.tar.gz 目錄替換vendor,問題解決 ``` 编辑配置: ``` $ cp .env.example .env ``` ``` ... DB_DATABASE=database DB_USERNAME=username DB_PASSWORD=password ... ``` 生成 KEY: ```shell $ php artisan key:generate ``` 迁移数据: ```shell php artisan migrate:refresh --seed ``` 开启服务: ```shell $ php artisan serve 实际操作 后台执行: $ cd /data/wwwroot/web/www.xgss.net/ $ nohup php artisan serve & (会写日志) $ nohup php artisan serve >/dev/null 2>&1 & 开放端口:8000 ``` 安装完成:http://127.0.0.1:8000 ## 配置nginx ``` vim /www/nginx_www.xgss.net.conf upstream www_xgss_net_SERVER { server 127.0.0.1:8000 weight=10; } server { listen 80; server_name www.xgss.net; #root /data/wwwroot/web/www.xgss.net/; access_log /data/wwwroot/log/www.xgss.net-access.log main_aliyun; error_log off; location / { index index.php index.html; proxy_pass http://www_xgss_net_SERVER; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } ``` ## 使用 ## 后台 http://www.xgss.net/admin 默认用户:admin 默认密码:admin 强烈建议修改密码 后台没有修改logo和站点名称的地方 # 页面展示 ![主页](public/screen/02.png) ![分类](public/screen/03.png) ![网站](public/screen/04.png) # 二次开发todo 修改页面 ## 感谢 前端设计:[**WebStackPage**](https://github.com/WebStackPage/WebStackPage.github.io) 后台框架:[**laravel-admin**](https://github.com/z-song/laravel-admin) ## License MIT