Configuring a RoR app w/ Mint...

travisbell

Well-Known Member
#1
Hey guys,

I have a working RoR app and dumped Mint insde /public. Then I setup a context to get the domain.com/mint working and all (to my suprise) is good so far. It even runs the PHP properly :)

Here's the catch. Mint says to append the following to your .htaccess, so I did but it's not working.

Code:
AddType application/x-httpd-php .html .htm
php_value auto_prepend_file /var/www/domain/public/mint/config/auto.php
I *could* simply append the js file but I would match rather prefer to have to keep the stats of everything behind the scenes regardless of what is included in my web page.

So, within my LiteSpeed environment, how can I make this work?

Thanks in advance guys!
 

mistwang

LiteSpeed Staff
#2
It should work. Mabye htaccess support has not been enabled in your setup. Please check "Allow Override" configuration for your RoR vhost.
 

mistwang

LiteSpeed Staff
#4
FileInfo and Options, and it does not hurt to check all of them.
It follows the same spec mentioned in Apache/PHP documentation.
 

travisbell

Well-Known Member
#5
I have both the server and vhost set with the following and still, Mint won't pick up and of the visits. Is this correct?



Thanks,
 

mistwang

LiteSpeed Staff
#6
The configuration looks ok.
You can turn on debug logging by set "Debug Level" to "HIGH" then check error.log see what is going on. Make sure to restart the server after configuration change.
Another way to do it is to create a static context for Mint directory, and add the configurations you mentioned in the first post to "Apache Style Configuration".
 

travisbell

Well-Known Member
#8
OK, I spoke too soon. I think I got too excited.

Yes, Mint is working in the /mint directory (which is useless) I still can't get anything happening off the root of the site. After I realized what I did with the context, this does make sense :)

I enabled debug logging but there is no error related to this.

I also don't see a single error in the logs (/opt/lsws/logs/error.log) either.

Any other avenues to check?
 

mistwang

LiteSpeed Staff
#9
Have you include the Mint java script in your rails application, I think it is the only thing required to make Mint to collect access information for a Rails application.
 

travisbell

Well-Known Member
#10
Yes, in the end it's looking like that the only way this is going to work.

So for the record, no matter what I tried to do with the .htaccess (which has worked on countless Apache installations for me) I couldn't get LiteSpeed to get it to click for me.

For now, just including:

Code:
<script src="/mint/?js" type="text/javascript"></script>
Will do.

Thanks!
 

mistwang

LiteSpeed Staff
#11
It is recommended to do it this way as the .htaccess hack will make all html static files served as PHP scripts, it will be a big performance hit for cached pages.
 
Top