Forum

log files not populated

Fred
4 December 2014, 14:33
Hello,

I manged to get hiawatha to run on my FreeBSD 10 server but I cannot update anything in wordpress..
When I looked at the logs, I realized that they all created but they are completely empty..
Could you please tell me how I can find out whey the logs are no populated?
root@zion /# ll /var/log/hiawatha/
total 6
-rw-r----- 1 www www 0 Dec 4 09:05 access.log
-rw-r----- 1 www www 0 Dec 4 09:05 error.log
-rw-r----- 1 www www 0 Dec 4 09:05 exploit.log
-rw-r----- 1 www www 0 Dec 4 09:05 garbage.log
-rw-r----- 1 www www 0 Dec 4 09:05 system.log
-rw-r----- 1 www www 0 Dec 4 09:05 dupon.access.log
-rw-r----- 1 www www 0 Dec 4 09:05 dupon.error.log


Thank you

Hiawatha version: v9.7
Operating System: FreeBSD 10
Hugo Leisink
4 December 2014, 14:35
Hiawatha also running as user 'www'? Is the server receiving any HTTP requests? Does the hostname you are using in your URL resolve to the right IP address?
Fred
4 December 2014, 21:06
Hi Hugo,

That was an impressive response time.. Thank you

I can access the webpages with no problem. I can also login to mysite.com/wp-admin
The only issue that I have is that I cannot update and plugin or the wordpreess core file...
The www user is set in the config file
/usr/local/etc/hiawatha/hiawatha.conf
# Hiawatha main configuration file
#

# GENERAL SETTINGS
#
ServerId = www
ConnectionsTotal = 1000
ConnectionsPerIP = 10
SystemLogfile = /var/log/hiawatha/system.log
GarbageLogfile = /var/log/hiawatha/garbage.log
ExploitLogfile = /var/log/hiawatha/exploit.log

LogFormat = extended
ServerString = Apache
CGIwrapper = /usr/local/sbin/cgi-wrapper

# BINDING SETTINGS
# A binding is where a client can connect to.
#
Binding {
Port = 80
# Interface = 192.168.1.125
MaxKeepAlive = 30
TimeForRequest = 3,20
}
#
#Binding {
# Port = 443
# Interface = ::1
# MaxKeepAlive = 30
# TimeForRequest = 3,20
# SSLcertFile = hiawatha.pem
#}


# BANNING SETTINGS
# Deny service to clients who misbehave.
#
BanOnGarbage = 300
BanOnMaxPerIP = 60
BanOnMaxReqSize = 300
KickOnBan = yes
RebanDuringBan = yes
BanOnDeniedBody = 300
BanOnSQLi = 300
BanOnFlooding = 10/1:15
BanOnInvalidURL = 300
BanOnWrongPassword = 3:300
BanlistMask = allow 82.31.44.171, allow 213.146.159.254, deny 192.168.1.0/24, deny 127.0.0.1
ReconnectDelay = 3

# COMMON GATEWAY INTERFACE (CGI) SETTINGS
# These settings can be used to run CGI applications.
#
#CGIhandler = /usr/local/bin/perl:pl
CGIhandler = /usr/local/bin/php-cgi:php
#CGIhandler = /usr/local/bin/python:py
#CGIhandler = /usr/local/bin/ruby:rb
#CGIhandler = /usr/local/bin/ssi-cgi:shtml
#CGIextension = cgi
#
FastCGIserver {
FastCGIid = PHP5
#ConnectTo = 127.0.0.1:2005
ConnectTo = /var/run/php-fpm.sock
Extension = php
SessionTimeout = 30
}


# URL TOOLKIT
# This URL toolkit rule was made for the Banshee PHP framework, which
# can be downloaded from http://www.hiawatha-webserver.org/banshee
#
#UrlToolkit {
# ToolkitID = banshee
# RequestURI isfile Return
# Match ^/(css|files|images|js|slimstat)($|/) Return
# Match ^/(favicon.ico|robots.txt|sitemap.xml)$ Return
# Match .*\?(.*) Rewrite /index.php?$1
# Match .* Rewrite /index.php
#}

UrlToolkit {
ToolkitID = block_bots
Header User-Agent Googlebot DenyAccess
Header User-Agent twiceler DenyAccess
Header User-Agent MSNBot DenyAccess
Header User-Agent yahoo DenyAccess
Header User-Agent BaiDuSpider DenyAccess
Header User-Agent Ask DenyAccess
# Header User-Agent Yahoo! Slurp DenyAccess
# Header User-Agent Sogou web spider DenyAccess
Header User-Agent Sogou-Test-Spider DenyAccess
Header User-Agent Baiduspider+ DenyAccess
Header User-Agent Yandex DenyAccess
Header User-Agent UniversalFeedParser DenyAccess
Header User-Agent Mediapartners-Google DenyAccess
Header User-Agent Sosospider+ DenyAccess
Header User-Agent YoudaoBot DenyAccess
Header User-Agent ParchBot DenyAccess
Header User-Agent Curl DenyAccess
Header User-Agent msnbot DenyAccess
Header User-Agent NaverBot DenyAccess
Header User-Agent taptubot DenyAccess
}

# DEFAULT WEBSITE
# 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 = 127.0.0.1
WebsiteRoot = /usr/local/www/hiawatha
StartFile = index.html
AccessLogfile = /var/log/hiawatha/access.log
ErrorLogfile = /var/log/hiawatha/error.log
#ErrorHandler = 404:/error.cgi
Include enable-sites/

# VIRTUAL HOSTS
# Use a VirtualHost section to declare the websites you want to host.
#
#VirtualHost {
# Hostname = www.my-domain.com
# WebsiteRoot = /var/www/my-domain/public
# StartFile = index.php
# AccessLogfile = /var/www/my-domain/log/access.log
# ErrorLogfile = /var/www/my-domain/log/error.log
# TimeForCGI = 5
# UseFastCGI = PHP5
# UseToolkit = banshee
#}


# DIRECTORY SETTINGS
# You can specify some settings per directory.
#
#Directory {
# Path = /home/baduser
# ExecuteCGI = no
# UploadSpeed = 10,2
#}
Hugo Leisink
4 December 2014, 23:05
The only issue that I have is that I cannot update and plugin or the wordpress core file...

For Wordpress questions, please visit the Wordpress website. I don't know much about that.
Fred
4 December 2014, 23:38
Hugo,

My question isn't about wordpress by hiawatha..
Maybe I didn't explained my problem properly..
Nginx for example populate lines in the the access.log file like the following
213.146.159.254 - - [04/Dec/2014:12:00:02 +0000] "GET /wp-content/plugins/themefuse-maintenance-mode/images/tabs_t.png HTTP/1.1" 304 0 "http://mysite.com/" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
213.146.159.254 - - [04/Dec/2014:12:00:02 +0000] "GET /wp-content/plugins/themefuse-maintenance-mode/css/bebasneue-webfont.ttf HTTP/1.1" 304 0 "http://mysite.com/" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
213.146.159.254 - - [04/Dec/2014:12:00:02 +0000] "GET /wp-content/plugins/themefuse-maintenance-mode/images/mail.png HTTP/1.1" 304 0 "http://mysite.com/" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
213.146.159.254 - - [04/Dec/2014:12:00:02 +0000] "GET /wp-content/plugins/themefuse-maintenance-mode/images/tabs_bottom_container_bg.png HTTP/1.1" 304 0 "http://mysite.com/" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
213.146.159.254 - - [04/Dec/2014:12:00:02 +0000] "GET /wp-content/plugins/themefuse-maintenance-mode/images/message_active.png HTTP/1.1" 304 0 "http://mysite.com/" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"

and the error then contain all the error messages....

What I am saying is that all the log file created in /var/log/hiawatha/* are ALL empty.
If I delete the file, the when I restart Hiawatha, the file are created agin but still remian empty.

I understand that the error file is empty is I have no problem with the system but I would expect the access file to be full of lines.

In what circumstances, does the files get populated in Hiawatha?

Thank you
Hugo Leisink
4 December 2014, 23:43
The logfiles get populated when something happens. The system.log should at least contain a 'Hiawatha started' message. I have no idea why it doesn't. Does this have something to do with some sort of security thing in FreeBSD?
Fred
5 December 2014, 00:01
I don't think so because when using Nginx I don't have this issue.
The system.log file is completely blank. I have an 'Hiawatha started' message.
Do you think I should move this problem to the FreeBSD forum?
My problem is that not many people on the FreeBSD forum know much about Hiawatha
Hugo Leisink
5 December 2014, 15:08
I've had some questions about this kind of issue before. In all cases the OS was the cause of the issue. I can't explain why the system.log is empty. That shouldn't happen. The FreeBSD forum might also be a good place to ask for help. I don't know what goes wrong.
Fred
5 December 2014, 21:41
Hi Hugo,

Thank you for the reply.
I'll post the problem on the FreeBSD forum and if I get a solution, I will update this forum for future reference.
Fred
5 December 2014, 23:11
Before going to the FreeBSD forum, I updated Hiawatha from v9.7 to v9.8 using portmaster and magic..
I now have some data in my log files..
This topic has been closed.