ModStart 安装说明

环境要求

操作系统

  • Linux/Unix
  • Windows

软件环境

  • Laravel 5.1 的运行环境
  • Apache/Nginx
  • PHP 5.5.9+ 或 PHP 7.0
  • MySQL 5.0+
  • Redis(可选)

安装步骤

  1. 配置 apache/nginx 服务器,请将网站的根目录配置到 <网站目录>/public;
  2. 访问 http://yourdomain.com/install.php;
  3. 使用安装引导向导进行安装;

参考配置

Nginx参考配置

  1. server {
  2. listen 80;
  3. server_name yourdomain.com;
  4. charset utf-8;
  5. index index.php index.html;
  6. root /path/to/yourdomain.com/public;
  7. autoindex off;
  8. location ^~ /.git {
  9. deny all;
  10. }
  11. location / {
  12. try_files $uri $uri/ /index.php?$query_string;
  13. }
  14. location ~ \.php$ {
  15. fastcgi_pass 127.0.0.1:9000;
  16. fastcgi_index index.php;
  17. fastcgi_param PHP_VALUE "open_basedir=/path/to/yourdomain.com/:/tmp/:/var/tmp/";
  18. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  19. include fastcgi_params;
  20. }
  21. location ~ \.(gif|jpg|jpeg|png|bmp|ico|css|js)$ {
  22. expires max;
  23. }
  24. location ~* \.(eot|ttf|woff|woff2)$ {
  25. add_header Access-Control-Allow-Origin '*';
  26. }
  27. }

Apache参考配置

  1. <VirtualHost *:80>
  2.   ServerName www.yourdomain.com
  3.   DocumentRoot d:/wwwroot/www.yourdomain.com/public
  4. </VirtualHost>