Git Product home page Git Product logo

little-url's Introduction

Web 环境,可以使用宝塔面板,或者 lnmp 一键包,只需要安装 Nginx、PHP 即可。

然后解析好域名,上传程序源码到网站根目录 wwwroot

接下来设置 Nginx 伪静态,在网站配置文件中添加以下代码:

#root 后面为网站根目录地址
location / {
  try_files $uri $uri/ =404;
  rewrite (\d+|\w+)$ /index.php?id=$1;

  location ^~ /asset/ {
    root /var/www/xx.com;
  }

  location ^~ /api/ {
    root /var/www/xx.com;
  }
  location ^~ /inc/ {
    return 403;
   }
  }

最后只需要修改 config.php 的相关配置并把 inc 目录权限设置为可读写即可。

little-url's People

Watchers

hipi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.