mirror of
https://github.com/danpros/htmly.git
synced 2026-04-18 03:26:20 +05:30
Merge pull request #30 from fanningert/master
Add an example Lighttpd & Nginx server configurations to README.md, fix missing `no-posts.html.php` on admin panel by @fanningert
This commit is contained in:
commit
282ac676e6
2 changed files with 57 additions and 1 deletions
57
README.md
57
README.md
|
|
@ -64,6 +64,61 @@ Admin role can edit/delete all users posts.
|
|||
|
||||
You can login to admin panel at `www.example.com/login`.
|
||||
|
||||
### Lighttpd
|
||||
Here a example configuration
|
||||
|
||||
````
|
||||
$HTTP["url"] =~ "^/config" {
|
||||
url.access-deny = ( "" )
|
||||
}
|
||||
$HTTP["url"] =~ "^/system/includes" {
|
||||
url.access-deny = ( "" )
|
||||
}
|
||||
$HTTP["url"] =~ "^/system/admin/views" {
|
||||
url.access-deny = ( "" )
|
||||
}
|
||||
|
||||
url.rewrite-once = (
|
||||
"^/(themes|system|vendor)/(.*)" => "$0",
|
||||
"^/(.*\.php)" => "$0",
|
||||
|
||||
# Everything else is handles by htmly
|
||||
"^/(.*)$" => "/index.php/$1"
|
||||
)
|
||||
````
|
||||
|
||||
### Nginx
|
||||
Here a basic configuration for nginx.
|
||||
|
||||
````
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
server_name example.com www.example.com;
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log error;
|
||||
|
||||
index index.php;
|
||||
|
||||
location ~ /config/ {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
}
|
||||
````
|
||||
|
||||
Both Online or Offline
|
||||
----------------------
|
||||
In addition by using the built-in editor in the admin panel, you can also write it offline and then upload them into `content/username/blog` folder (the username must match with `YourUsername.ini` above).
|
||||
|
|
@ -122,4 +177,4 @@ Contribute
|
|||
|
||||
Copyright / License
|
||||
-------------------
|
||||
For copyright notice please read [COPYRIGHT.txt](https://github.com/danpros/htmly/blob/master/COPYRIGHT.txt). HTMLy licensed under the GNU General Public License Version 2.0 (or later).
|
||||
For copyright notice please read [COPYRIGHT.txt](https://github.com/danpros/htmly/blob/master/COPYRIGHT.txt). HTMLy licensed under the GNU General Public License Version 2.0 (or later).
|
||||
|
|
|
|||
1
system/admin/views/no-posts.html.php
Normal file
1
system/admin/views/no-posts.html.php
Normal file
|
|
@ -0,0 +1 @@
|
|||
<h1>No posts found!</h1>
|
||||
Loading…
Add table
Add a link
Reference in a new issue