Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/PerfectlySoft/Perfect-FastCGI-Apache2.4
mod_perfect - Apache FastCGI connector
https://github.com/PerfectlySoft/Perfect-FastCGI-Apache2.4
Last synced: about 1 month ago
JSON representation
mod_perfect - Apache FastCGI connector
- Host: GitHub
- URL: https://github.com/PerfectlySoft/Perfect-FastCGI-Apache2.4
- Owner: PerfectlySoft
- License: apache-2.0
- Created: 2016-04-04T14:03:27.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-19T19:06:38.000Z (almost 8 years ago)
- Last Synced: 2024-07-23T04:35:46.203Z (about 2 months ago)
- Language: C++
- Homepage: www.perfect.org
- Size: 19.5 KB
- Stars: 7
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- TheList - Perfect FastCGI Apache 2.4
README
# Perfect - mod_perfect - Apache 2.4 Connector
## Issues
We are transitioning to using JIRA for all bugs and support related issues, therefore the GitHub issues has been disabled.
If you find a mistake, bug, or any other helpful suggestion you'd like to make on the docs please head over to [http://jira.perfect.org:8080/servicedesk/customer/portal/1](http://jira.perfect.org:8080/servicedesk/customer/portal/1) and raise it.
A comprehensive list of open issues can be found at [http://jira.perfect.org:8080/projects/ISS/issues](http://jira.perfect.org:8080/projects/ISS/issues)
## Linux Build Notes
* cd Sources
* makeThis will automatically install the appropriate Apache development resources if required, potentially prompting you for your sudo password. You must then install the produced mod_perfect.so as you would any other Apache module.
## Configuration
Here is an Apache conf snippet which pipes files/directories which do not exist through to Perfect Server. This is handy if you are using Perfect's URL routing system (or your own system).
```
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) - [L,NS,H=perfect-handler]```
Here is a sample Apache .conf snippet. This uses mod_rewrite in order to provide extension-less URLs for mustache templates.
```
LoadModule perfect_module /path/to/mod_perfect.so
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
### Sample vhost
ServerName my-server.local
DocumentRoot "/path/to/my-server/webroot"
Require all granted
DirectoryIndex index.mustache index.html
RewriteEngine on
# unless a directory, remove trailing slash
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ $1 [R=301,L]
# resolve .mustache file for extensionless mustache urls
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME}\.mustache -f
RewriteRule ^(.*)$ $1.mustache [NC,PT,L]
# redirect external .mustache requests to extensionless url
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /([^/]+/)*[^.#?\ ]+\.mustache([#?][^\ ]*)?\ HTTP/
RewriteRule ^(([^/]+/)*[^.]+)\.mustache $1 [R=301,L]
SetHandler perfect-handler
### Sample vhost
```
## Further Information
For more information on the Perfect project, please visit [perfect.org](http://perfect.org).