https://github.com/pagespeed/ngx_pagespeed
Thats the module I'd like to use.
I currently have a rails app that is using passenger with nginx. I would like to add the pagespeed module to my app's nginx which is on heroku.
Here are the instructions I followed:
https://github.com/phusion/passenger-ruby-heroku-demo
The basic package managers, yum, apt-get etc install a precompiled nginx which doesn't have pagespeed module enabled.
If you want to use it, you'll need to build nginx from source:
https://developers.google.com/speed/pagespeed/module/build_ngx_pagespeed_from_source
Since you're asking specifically about Heroku, which I'm not familiar with, it sounds like you're going to need to modify a nginx buildpack to follow the instructions for installing pagespeed above?
Related
I want to deploy my Laravel App in a VPS hosting plan.
I have a WHM, but I've no experience deploying my app and configure the server.
I don't have a domain, so I want to test my app using an IP address (like DigitalOcean)
any help?
Edit:
I've completed these steps into my WHM.
Have SSH access to the VPS
Have a sudo user and set up some kind of firewall (for example ufw)
Install required software (nginx, MySQL, PHP, Composer, npm) and additional PHP modules if necessary.
I've created an account ( CPanel ) and I've completed steps
Create a database
Checkout your application using VCS like Git
Configure your .env file.
Install your composer packages, run npm, or anything you would like to do
The account ( CPanel provides an IP address that looks like http://xxx.xxx.x.xx/~cpanel-account-name/).
I can access the website correctly ( however all images are broken and even laravel-routes are not found 404). I know the issue is because ( ~cpanel-account-name/ ) found at the end of the URL.
But how can I fix It?
Since this is quite a broad topic that consists of multiple questions, perhaps you could elaborate on steps you have already taken or the step you are stuck at / need help with?
In short, you need to do the following:
Have SSH access to the VPS
Have a sudo user and set-up some kind of firewall (for example ufw)
Install required software (nginx, MySQL, PHP, Composer, npm) and additional PHP modules if necessary.
Create a database
Checkout your application using VCS like Git
Configure your .env file.
Install your composer packages, run npm or anything you would like to do
Set-up nginx
If this seems daunting, I would advice to tackle it one by one and trying to research every step along the way. This might be challenging and time-consuming, but will be very rewarding!
Alternatively, a paid solution like Laravel Forge can help you take care of server management.
Also in Cpanel, I have Rubygems and Rails icons to go to those pages.
I can see tutorials for how to setup Sinatra on Apache, but they don't work for Ramaze and I'm using Litespeed server.
For another question, how can I run a Ramaze app on Apache in a ruby enabled environment? Maybe Apache and Litespeed are dual-installed.
I added https://gist.github.com/2cf310f39b13f5d6f3b4 as my .htaccess file and it did not work for http://compesh.uk.to Cpanel says I also have Apache but online says Litespeed.
You need something more than just apache for a ruby app (phusion passenger for example). Ramaze is a rake based app gem so you should have a look to this side...
First google result for "deploy ramaze" : http://www.codeotaku.com/blog/2009-10/ramaze-and-rack
Good luck ! ;-)
I want to build application which servers as a stand-alone system service, always run on the backend and servers a front-end with a web interface.
Like we do in Linux /etc/init.d/apache2 start , Same as I want to server my application /etc/init.d/myapp start.
My major target is to deliver on Linux specially Ubuntu, whole app would be in plain Ruby and front-end would be in Sinatra.
I want to make it install with simple, gem install my_app and command line features get available to start the service. The application would be doing heavily processing and database insertion. And I want that its configurations must be set as in pure linux fashion, like /etc/apache2/apache2.conf
Can any one guide me in it? Also if possible, i want to secure the code, is there any possibilities for it?
I am using the Daemon-Kit gem for the same requirements. Works very well in production. The only thing it does not include is the configuration with a .conf file, but it's easy to do it yourself with Ruby code. You can deploy with Capistrano, no need to install.
I've been looking into using mod_rails (Phusion), but I just wanted to verify this: Once it's installed, I can still serve regular, non-rails apps from the same server without making any changes. Is this correct?
It is correct. I'm using Passenger in a project with other PHP projects and it works fine (even some PHP files in your public folder).
You can also set the passenger to start standalone (passenger start -d in your rails root folder) and use the mod_proxy and mod_rewrite from Apache to handle it (redirecting the rails requests to the rails app).
Yes, you can still serve non-rails applications using the same server.
mod_rails automatically detects which DocumentRoots are Rails applications by looking for public, for example.
I'm running a few rails/rake apps in Apache/passenger and I want to add the documentation app served by gem server to these apps, so I can easily give it a special (sub)domain, like docs.example.org, so it's easily available for all members of our team and nobody has to start the server himself or remember port numbers (like 8808, the default gem server port).
I would recommend looking into bdoc instead of gem server, it allows the user to access all their gem docs without a server running at all. It would also be trivial to modify bdoc to output to a specific directory then you could easily add a step to regenerate the docs.
The nice thing about having them in static files would be the apache config is dead simple.
If you do want to make bdoc output to a specific dir look at this line.
Edit:
I actually went ahead and branched this on github and made the change. Now you can supply the output directory on the command line and it will generate the static rdoc pages for you.
I'm running http://gems.local on my machine in case I want to do some Ruby cracking offline. (Plain journey, trains, etc).
This is really easy, you can actually run passenger with all the Ruby gems' documentation locally without having to access the net.
I was following Jason's tips and got everything working. See the following article and you should be ready to go:
http://jasonseifer.com/2009/02/22/offline-gem-server-rdocs
Attila
I wrote a blog post on how I have my gems, ruby, rails and jquery docs locally using the yard server and nginx for proxing in mac os x. Steps for linux are almost the same, only thing that changes is the way to configure the daemons.
https://makarius.posterous.com/offline-rails-ruby-jquery-and-gems-docs-with