Integration of Awstats into Ruby on Rails - ruby-on-rails-3

I'm currently working on a RoR project, and stumbled upon a problem.
What I have:
A RoR 3.1 project running on Nginx on a debian server.
What I want:
I want to be able to see the web statistics of my website. Statistics like the amount of hits, the source and perfectly ordered per some predefined time interval. Preferably with a few cool graphs, charts tables, whatever.
What I did:
I looked on the internet for some RoR extensions which supported this, but didn't got very excited with the results. Therefore I looked at tools like 'Webalizer' and 'Awstats'. Finally decided to go with Awstats.
What seems to be the problem:
Now I can access the main page of Awstats, but once I want to look at other months, it sends a request to awstats.pl. This request is (I think) send from Nginx to RoR first. Then RoR looks in its routes.rb for the correct route. Then RoR can't find the route, and redirects me to the 404 error.
I would like to know if there is somebody out there who has some experience in these kind of things. Maybe knows how to configure Awstats correctly for RoR, or either knows another good statistics tool for RoR.
Any help will be greatly appreciated.
-Ron

Related

Error deploying vue app using any type of deployment

I have only deployed a couple small apps before and I am still newer to deploying apps in general.
I created this app by following a course and have recently finished the project. The course did not provide instructions on how to deploy the app. I have used Firebase hosting a couple times and am also somewhat familiar with Heroku. Regardless, it all seems pretty straight forward after following documentation.
I first tried Firebase hosting since that is what I am most familiar with. Spent some time with that with no luck, then tried heroku, then netlify, then NOW. Every single one of them had issues without any real information on them.
NOW says deployement failed with no logs.
Firebase hosting doesn't seem to be logging any errors, it builds a blank page.
Netlify says page not found after deployment and Heroku was something similar.
I am 100% open to getting this simple app deployed using any approach at all (preferably the easiest one).
Since I am following documentation and there doesn't seem to be any errors being logged, I'm completely stumped and am not sure what to do.
I realize I might not be providing the most helpful information to solve this issue, although I do have my full repo here:
https://github.com/SIeep/austin-pizza
Would anyone be kind enough to look over my repo and see what the issue might be? Or even point me in the right direction?
Please let me know if I need to provide any additional information.
Thanks!
missing entry file or file path problem ?
Try to find out which stage the problem is at first.
Compare this and last successful Firebase Configuration(dependency path),
Compare this and the last build dist file (not detail code,just File structure)
compare webpack.config.js
(app can run well locally,so i think it wouldn't because of the problem with the app's own code)

Website crashing when too many requests happen at once

We have a website which advertises a competition on TV each month. When the advert runs the website gets around 4000 submissions and this causes it to crash
The website runs off Silverstripe and is hosted on Apache.
I have read about queuing, and this sounds like the solution but I have spoken to the Silverstripe dev and the Server admin and both say that the other needs to make this happen.
My question is should the queuing be done on the website or the server?
To help Silverstripe handle lots of requests you can install the Static Publishing module:
http://www.silverstripe.org/introducing-the-static-publish-queue-module/
Your developer would implement that on the website.
This will create a flat version of your website that is served to users. This greatly reduces server load.
What kind of server are you running? You can get many different types these days... for example some do load balancing etc which might help prevent the crashing.
Also there are plenty of third party applications that you could integrate with to help you with job queuing like http://www.iron.io/ or http://aws.amazon.com/sqs/.
Another option is to find a module for silverstripe that already exists... I had a really quick look on github and found a one that might do the job you require -
https://github.com/silverstripe-australia/silverstripe-queuedjobs
Let me know how you get on :)
Good overview of all the areas to look at for SilverStripe on http://www.silverstripe.org/improving-silverstripe-performance/.

Basic Setup for JSF with Apache

I'm currently working on a JSF project at work. But, I get everything preconfigured, all I have to do is hack my code.
I've been doing this for a few weeks now and I tasted blood using JSF. So to intensify my knowledge I want to build myself a setup which I can use at home to test, work and educate myself.
So what do I need, and what do I need to configure so everything works. Preferably I'd like to use Apache and Tomcat, but that's about as far as my knowledge goes. I do know, that I should have/need a framework like Spring, but what exactly is that for?
I'd appreciate the help
Thx!

Is there a web application out on the web somewhere that can test apache conf files? Something like JSFiddle for Apache?

Many of us use jsfiddle.com to share DHTML situations with other people. You can include plugins like JQuery while testing. it's very convenient, especially when posting to stackoverflow.com.
I am interested in something like that for Apache httpd. Does it exist?
Here is a diagram of what I'm thinking of. You can imagine all the things that you could do with this.
This does not exist anywhere. I am working on this project starting two weeks ago.

What is the easiest way to install a R web application through RApache?

I use windows XP and R for my desktop use. And a shared hosting account (at some company) for my web hosting needs.
I wish to create an R web application and I understand that one such way is by using R with Apache through RApache , but since my current shared hosting plan doesn't allow me to install RApache I am a bit stuck.
So... (and here's my question) what would be the easiest/fastest/cost-effective way to get started?
Buying a more expensive hosting package ?
Hosting the thing myself? (on windows ?!)
switch to some other hosting company that permits the use of RApache?
Any suggestion will be most helpful.
Self-hosting is an option if you insist on using RApache. This might be easier than you think. Here's a link to a blog post i read a month ago before i decided to buy the hardware and server my own files. i just watched this seven minute YouTube video tutorial entitled "R Web Application–'Hello World' using RApache" I believe this was just posted today.
In seven minutes, the author walks through building a "hello world" Site using RApache then walks through a more ambitious example, building a user-input form to collect inputs then deliver them to a particular R function--pretty much a exemplary slice of what i suspect most people would want to use RApache for.
A second option is using a web framework. My recommendation here is Django. Why? It's written in Python so you can access R functionality via the python bindings (RPy2). Second, if you are not an experienced web developer, Django is in many ways, a great framework to begin with because it's truly a "full-stack" solution--it works more or less out of the box. In addition, there is a substantial and growing body of quality step-by-setp tutorials, code snippets, and even packaged django Sites, to learn from.
it seems they provide a VMWare image to get up and running quickly.
I suggest you download VMWare player and try the image. Since RApache isn't available for Windows, this is the most simple way, I guess. I wouldn't use that for hosting, but I would first try whether this stack is actually the right thing for your app. Also, this allows you testing things locally.
Doug,
Should I read your suggestion as saying that a Django app can call the RPy2 functionality without RApache? If so, that sounds like a solution for folks on shared hosting who can't install the RAPache module.