Sean-Der / fail2web

a fail2ban GUI powered by fail2rest
536 stars 48 forks source link

404 Page Not Found #31

Closed Monstar316 closed 8 years ago

Monstar316 commented 8 years ago

Hello,

I already have fail2ban installed and decided to setup the web service.

I've followed the installation for fail2rest and fail2web, as per your instructions on http://siobud.com/blog/installing-fail2web but I get a "404 page not found"

I'm running on Ubuntu 14.04 x64 and have go version 1.4.2 installed.

Sean-Der commented 8 years ago

Hi @Monstar316 ! Sorry it took me so long, don't know how I missed this!

Are you able to communicate with fail2rest at all? curl http://127.0.0.1:5000/global/status should return a JSON blob. If it doesn't check that fail2rest is running.

If that does work, check your nginx/apache config to make sure it is properly setup. If you are still having issues mind posting your HTTP server config and I can help debug that.

thanks

Monstar316 commented 8 years ago

Yes, it echoes back all my activate jails when I run that command so my fail2rest is up & running.

Apache is working fine, as all my other front-end sites are working fine. Is it the info from my apache2.conf that you need?

On Sun, 13 Mar 2016 at 03:37 Sean DuBois notifications@github.com wrote:

Hi @Monstar316 https://github.com/Monstar316 ! Sorry it took me so long, don't know how I missed this!

Are you able to communicate with fail2rest at all? curl http://127.0.0.1:5000/global/status should return a JSON blob. If it doesn't check that fail2rest is running.

If that does work, check your nginx/apache config to make sure it is properly setup. If you are still having issues mind posting your HTTP server config and I can help debug that.

thanks

— Reply to this email directly or view it on GitHub https://github.com/Sean-Der/fail2web/issues/31#issuecomment-195862755.

Sean-Der commented 8 years ago

Ok good, that is usually the part that falls down!

Would you mind posting your apache config for fail2web, like this one below? Also I would check your apache error log there might be something useful in there! Usually in /var/log/apache2/error.log or /var/log/httpd/error.log

Also feel free to email me at sean@siobud.com if you have any information in config/logs you don't want on the public inet.

thanks!

Monstar316 commented 8 years ago

Here is what is in my fail2web.conf:

<VirtualHost :80> *

Here is an extract from the error.log for Apache2:

_[Sun Mar 13 15:13:09.093635 2016] [mpmprefork:notice] [pid 17029] AH00169: caught SIGTERM, shutting down [Sun Mar 13 15:13:11.001527 2016] [ssl:warn] [pid 29294] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) [Sun Mar 13 15:13:11.001764 2016] [:notice] [pid 29294] ModSecurity for Apache/2.7.7 (http://www.modsecurity.org/ http://www.modsecurity.org/) configured. [Sun Mar 13 15:13:11.001785 2016] [:notice] [pid 29294] ModSecurity: APR compiled version="1.5.1-dev"; loaded version="1.5.1-dev" [Sun Mar 13 15:13:11.001799 2016] [:notice] [pid 29294] ModSecurity: PCRE compiled version="8.31 "; loaded version="8.31 2012-07-06" [Sun Mar 13 15:13:11.001810 2016] [:notice] [pid 29294] ModSecurity: LUA compiled version="Lua 5.1" [Sun Mar 13 15:13:11.001821 2016] [:notice] [pid 29294] ModSecurity: LIBXML compiled version="2.9.1" [Sun Mar 13 15:13:12.001198 2016] [ssl:warn] [pid 29296] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache] [Sun Mar 13 15:13:12.001765 2016] [ssl:warn] [pid 29296] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) _[Sun Mar 13 15:13:12.037489 2016] [mpm_prefork:notice] [pid 29296] AH00163: Apache/2.4.7 (Ubuntu) OpenSSL/1.0.1f modfcgid/2.3.9 configured -- resuming normal operations [Sun Mar 13 15:13:12.037538 2016] [core:notice] [pid 29296] AH00094: Command line: '/usr/sbin/apache2'

I hope this helps.

On Sun, 13 Mar 2016 at 14:03 Sean DuBois notifications@github.com wrote:

Ok good, that is usually the part that falls down!

Would you mind posting your apache config for fail2web, like this https://github.com/Sean-Der/fail2web/blob/master/http-configs/apache/httpasswd-auth one below? Also I would check your apache error log there might be something useful in there! Usually in /var/log/apache2/error.log or /var/log/httpd/error.log

Also feel free to email me at sean@siobud.com if you have any information in config/logs you don't want on the public inet.

thanks!

— Reply to this email directly or view it on GitHub https://github.com/Sean-Der/fail2web/issues/31#issuecomment-195961708.

Sean-Der commented 8 years ago

Is anything else already using the ServerName UbuntuMS?

After you visit http:///UbuntuMS try looking in your Apache access_log, it should give the full path to the file it tried to access and failed because of permissions.

It also could be a permissions issues. If /var/www/fail2web/web isn't accessible to the apache user, that could be causing the issue?

Monstar316 commented 8 years ago

I managed to get it working. I made a copy of the original index.html file, deleted the original and then copied it back over again and it then loaded up fail2web.

I checked the permissions of index.html before and after I deleted & copied it back but nothing had changed. Really strange!

Anyway, all is well now. :-)

Thanks for the advice.

On Sun, 13 Mar 2016 at 20:30 Sean DuBois notifications@github.com wrote:

Is anything else already using the ServerName UbuntuMS?

After you visit http:///UbuntuMS try looking in your Apache access_log, it should give the full path to the file it tried to access and failed because of permissions.

It also could be a permissions issues. If /var/www/fail2web/web isn't accessible to the apache user, that could be causing the issue?

— Reply to this email directly or view it on GitHub https://github.com/Sean-Der/fail2web/issues/31#issuecomment-196046943.

Sean-Der commented 8 years ago

I just keep turning it on and off till it works again :)

That is great to hear! Well, thanks for using fail2web and if you run into any bugs or have feature ideas I would love to hear!

thanks