2、phalcon启动webserver

格式有点乱 请看笔记 http://note.youdao.com/s/L6j0iUVZ

 

在根目录快速启动

 

$(which php) -S localhost:8000 -t public .htrouter.php

 

命令说明

  • $(which php) - will insert the absolute path to your PHP binary
  • -S localhost:8000 - invokes server mode with the provided host:port
  • -t public - defines the servers root directory, necessary for php to route requests to assets like JS, CSS, and images in your public directory
  • .htrouter.php - the entry point that will be evaluated for each request

 

 

-> % $(which php) -S localhost:8000 -t public .htrouter.php PHP 7.3.22 Development Server started at Sun Nov 15 11:57:02 2020 Listening on http://localhost:8000 Document root is /Users/bob/workspace/templateworkspace/phalcon_demo/public Press Ctrl-C to quit.

 

访问 http://localhost:8000

 

 

 

 

 

apache vhost配置

 

<VirtualHost *:80> ServerAdmin admin@example.host DocumentRoot "/var/vhosts/tutorial/public" DirectoryIndex index.php ServerName example.host ServerAlias www.example.host <Directory "/var/vhosts/tutorial/public"> Options All AllowOverride All Require all granted </Directory> </VirtualHost>

 

 

NOTE: Note that using .htaccess files requires your apache installation to have the AllowOverride All option set.

 

在httpd.conf添加

 

 

<Directory /> AllowOverride ALL </Directory>

 

 

完成

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值