定制 elecena/nano 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

elecena/nano

最新稳定版本:v0.18.0

Composer 安装命令:

composer require elecena/nano

包简介

A legacy PHP framework for elecena.pl

README 文档

README

nano Latest Stable Version phpunit Coverage Status

Testing

docker run -d -p 6379:6379 --name redis-test redis:5.0.9-alpine redis-server --requirepass qwerty --port 6379
docker run -d -p 5555:80 --name httpin kennethreitz/httpbin
composer run test

Configuration

  • Add the following entry to /etc/hosts:
127.0.0.1       elecena.local
  • Copy ../app/apache/000-elecena.conf to /etc/apache2/sites-available.
  • sudo a2enmod rewrite && sudo a2enmod php5 && sudo a2ensite 000-elecena.conf
  • sudo service apache2 restart

rsyslog

  • Uncomment the following in /etc/rsyslog.conf:
# provides UDP syslog reception
$ModLoad imudp
$UDPServerRun 514
  • sudo service rsyslog restart

Apache

RewriteEngine On

# static assets
RewriteRule \.(css|js|gif|png|jpg)$ static.php [L]

# API requests
RewriteRule \.(json|xml)$ api.php [L]

# URL - last (always redirect)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule (.*) index.php [L]

Nginx

<nginx>
	<location path="/">
		<!-- static assets -->
		<rewrite>\.(css|js|gif|png|jpg)$ /static.php</rewrite>

		<!-- API requests -->
		<rewrite>\.(json|xml)$ /api.php</rewrite>

		<!-- URL - last (always redirect) -->
		<!-- @see http://rootnode.net/web#vhost-configuration-advanced-mode -->
		<if condition="!-f $request_filename">
			<rewrite>^/(.+)$ /index.php last</rewrite>
			<break/>
		</if>
	</location>
</nginx>

统计信息

  • 总下载量: 1.96k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-03-16