elecena / nano
A legacy PHP framework for elecena.pl
Installs: 1 549
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 6
Requires
- php: ^8.1
- ext-curl: *
- ext-gd: *
- ext-json: *
- ext-mbstring: *
- ext-mysqli: *
- ext-xml: *
- ext-xmlwriter: *
- ext-zlib: *
- macbre/monolog-utils: ^3.0.0
- monolog/monolog: ^3.3.1
- predis/predis: ^2.0
- tedivm/jshrink: ^1.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpstan/phpstan: ^1.0.1
- phpunit/phpunit: 10.5.12
- psr/cache: ^3.0.0
- dev-master
- v0.14.0
- v0.13.0
- v0.12.0
- v0.11.0
- v0.10.0
- v0.9.0
- v0.8.1
- v0.8.0
- v0.7.0
- v0.6.0
- v0.5.0
- v0.4.0
- v0.3.0
- v0.2.0
- v0.1.0
- dev-dependabot/composer/phpstan/phpstan-2.0.2
- dev-dependabot/composer/phpunit/phpunit-11.4.3
- dev-dependabot/composer/phpstan/phpstan-2.0.1
- dev-dependabot/composer/friendsofphp/php-cs-fixer-3.64.0
This package is auto-updated.
Last update: 2024-11-18 15:06:47 UTC
README
nano
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>