Here is an example hiawatha config file, I have GRAV set up like the sub domain entry in the below.
I tried pointing apache to my GRAV install folder, I can access the single default home page, but can not get the admin section to open, is there a specific way to get to the admin login screen, all of this worked in hiawatha, other than the one error am left with and the file permission issues.
I do not understand sym links, and am not to my knowledge
using them.
EXAMPLE HIAWATHA CONFIGURATION FILE BELOW
#FIRST!!!
#MAKE A COPy OF hiawatha.conf file BEFORE YOU MAKE
#ANY ALTERATIONS, better to be safe than sorry.
#Note, am using php Fast-CGI
#THEN
#Use the below tookit in your hiawatha.conf file
#Use either the DEFAULT WEBSITE section to enter your
#details, or a virtual host section
#DO NOT USE BOTH
#There are many other settings in the hiawatha.conf
#file that are not shown here, just copy and paste the
#parts in this file into your hiawatha.conf file and
#alter where need be,such as “yourfolder” which should
#be replaced by the name of the folder you install GRAV into,
#when you open “yourfolder” you should see al the GRAV folders
#and files inside.
#and “yoursite” should be replaced by the likes of “microsoft”, as
#if your site were named microsoft.com
#===Toolkit Below is for GRAV On hiawatha Web Server ===
UrlToolkit {
ToolkitID = grav
Match base64_encode[^(]([^)]) DenyAccess
Match (<|%3C)([^s]s)+cript.(>|%3E) DenyAccess
Match GLOBALS(=|[|%[0-9A-Z]{0,2}) DenyAccess
Match _REQUEST(=|[|%[0-9A-Z]{0,2}) DenyAccess
Match ^/(.git|cache|bin|logs|backup|webserver-configs)/(.) DenyAccess
Match ^/(system|vendor)/(.).(txt|xml|md|html|yaml|php|pl|py|cgi|twig|sh|ba t)$ DenyAccess
Match ^/(user)/(.*).(txt|md|yaml|php|pl|py|cgi|twig|sh|bat)$ DenyAccess
Match .md$ DenyAccess
Match ^/(LICENSE.txt|composer.lock|composer.json|.htaccess)$ DenyAccess
RequestURI exists Return
Match .* Rewrite /index.php
}
#=== End of This toolkit entry ===
#Refference the GRAV toolkit above in the host or virtual host section
#where you wish to include your GRAV sited details,like bolow.
DEFAULT WEBSITE, add your site details here, sub domains go
#in a different section.
It is wise to use your IP address as the hostname of the default website
and give it a blank webpage. By doing so, automated webscanners won’t find
your possible vulnerable website.
Hostname = 120.245.82.190
#Hostname = 127.0.0.1
WebsiteRoot = /var/www/yourfolder
UseToolkit = grav
StartFile = index.php
#ExecuteCGI = yes , no, you can see am using fastCGI
#and the line below reflects this
UseFastCGI = PHP5
AccessLogfile = /var/log/hiawatha/access.log
ErrorLogfile = /var/log/hiawatha/error.log
#This is the end of the default website section,
#in reality there are many more options that one could include,
#they are explained on the hiawatha website.
#Below is an example of GRAV install details for subdomain.
#Refference the GRAV toolkit above in the virtual host section
#where you wish to include your GRAV site details,like shown beolow.
#In the example below I am using a subdomain to access the Grav site.
#If you wish to install GRAV as your main site, then use the default
#site section and fill in your details there, they will be the same details
#except you will not be entering any virtual host settings such as in the
#example below.
BELOW IS A VIRTUAL HOST ENTRY.
#Hostname = myblog.example, *.myblog.example
VirtualHost {
Hostname = www.yourfolder.yoursite.com, *.yourfolder.yoursite.com
WebsiteRoot = /var/www/yourfolder
StartFile = index.php
AccessLogfile = /var/www/yourfolder/access.log
ErrorLogfile = /var/www/yourfolder/error.log
#TimeForCGI = 10
#ExecuteCGI = yes
UseFastCGI = PHP5
UseToolkit = grav
#UseToolkit = banshee
}
The below settings shoud be at the top of this file, IP
put them here as they are just for clarification if need be.
They show the http settings and how to include a script functionallity.
GENERAL SETTINGS
#ServerId = www-data
ConnectionsTotal = 1000
ConnectionsPerIP = 25
SystemLogfile = /var/log/hiawatha/system.log
GarbageLogfile = /var/log/hiawatha/garbage.log
BINDING SETTINGS
A binding is where a client can connect to.
Binding {
Port = 80
}
#Binding {
#Port = 443
TLScertFile = ssl/hiawatha.pem
Interface = 127.0.0.1
MaxRequestSize = 2048
TimeForRequest = 30
#}
BANNING SETTINGS
Deny service to clients who misbehave.
#BanOnGarbage = 300
#BanOnMaxPerIP = 60
#BanOnMaxReqSize = 300
#KickOnBan = yes
#RebanDuringBan = yes
COMMON GATEWAY INTERFACE (CGI) SETTINGS
These settings can be used to run CGI applications.
#CGIhandler = /usr/bin/perl:pl
#Uncommented the line below after initial install.
#CGIhandler = /usr/bin/php-cgi:php
#CGIhandler = /usr/bin/python:py
#CGIhandler = /usr/bin/ruby:rb
#CGIhandler = /usr/bin/ssi-cgi:shtml
#CGIextension = cgi
FastCGIserver {
FastCGIid = PHP5
#ConnectTo = /var/lib/hiawatha/php-fcgi.sock:9000, does not work,
#ConnectTo = /run/php-fpm/php-fpm.sock does not work,
ConnectTo = 127.0.0.1:9000
port 9000 is configured in the php-fpm conf file
Extension = php
}