20
votes
Accepted
Restore a versioned S3 bucket to a particular point in time
You can use s3-pit-restore
S3 Point in Time Restore is a tool you can use exactly to restore a bucket or a subset of a bucket to a given point in time, like this:
s3-pit-restore --bucket my-bucket --...
11
votes
Accepted
How do I get yarn installed on elastic beanstalk?
You can customize packages that are installed and commands that are run on deploy with .ebextensions
For yarn, I created a file with the following commands which install a recent node version and ...
6
votes
Prevent mail being marked as spam
In addition to all the steps in the excellent accepted answer a number of the largest e-mail providers have special tools and program's for (bulk) senders that will help you to prevent your valid ...
5
votes
"768 worker_connections are not enough" error after a fresh installation of nginx and ROR
Old question, but i had the same issue and the accepted answer didnt work for me.
I had to increase the number of worker_connections, as stated here.
/etc/nginx/nginx.conf
events {
...
4
votes
Elastic Beanstalk Rails - Modify passenger config passenger_max_pool_size
I realize that this is an old post, however it is unanswered.
Best option is to use .ebextensions dir in the root of your project, and add a config file to configure passenger. I've created an ....
3
votes
Accepted
Why is my request queueing time so high?
200ms doesn't seem that terrible. The 'request queuing' metric is the measure of time between your web server logs the request and the moment the New Relic agent loads (after before_filters). The ...
3
votes
Accepted
Pointing Custom Domain to Server on Nginx
Your server_name needs to match the CNAME record you created, not the target of the CNAME.
3
votes
NGINX Permissions: 'sudo nginx' vs 'sudo service nginx start'
Some additional information for those who want to extend a little bit knowledge on selinux and to debug issues with selinux:
https://www.nginx.com/blog/nginx-se-linux-changes-upgrading-rhel-6-6/
tl;...
3
votes
How do I get yarn installed on elastic beanstalk?
As stated in the accepted answer, you can create .ebextensions/some.config to order EB instances to install yarn on the instance creation. In current EB environment, I find following config to be ...
3
votes
Why is bundler failing to find rake while deploying with Capistrano?
Logging into the server and manually executing the following fixed this issue:
/home/deploy/.rbenv/bin/rbenv exec gem update --system
This is not satisfying from a reproducibility/CI perspective, but ...
2
votes
Customer Passenger Error Pages
In newer versions of Phusion Passenger, set the following within your Apache virtual host:
PassengerErrorOverride on
ErrorDocument 500 /path/to/500.html
2
votes
How should secret files be pushed to an EC2 (on AWS) Ruby on Rails application?
It is possible (and easy) to store sensitive files in S3 and copy them to your Beanstalk instances automatically.
When you create a Beanstalk application, an S3 bucket is automatically created. This ...
2
votes
How to force or redirect to SSL in nginx?
I think this is the most simple solution. Forces both non-HTTPS and non-WWW traffic to HTTPS and www only.
server {
listen 80;
listen 443 ssl;
server_name domain.tld www.domain.tld;
...
2
votes
AWS: By what IP address should I reference on an EC2 instance where is running Redis?
If you use ElastiCache with Redis then you should use DNS of your cluster. It usually looks like this redis.j5k8wa.0001.use1.cache.amazonaws.com and you can get it from your node configuration. Amazon ...
2
votes
Why do I get duplicate HSTS headers? AWS ELB, nginx, Ruby on Rails
Rails adds a HSTS header when you set config.force_ssl = true.
Since the error is that it's being duplicated, you're probably setting nginx to set the same header. Choose for either rails or nginx ...
2
votes
Unable to install qt55 in Amazon Linux AMI
In AmazonLinux Qt5 Webkit is available via EPEL repository, you have to do following to have it installed:
sudo yum install epel-release
sudo yum-config-manager --enable epel
sudo yum install qt5-...
2
votes
App Engine Ruby flex environment app.yaml is ignoring env_variables RAILS_ENV
This actually looks like a misfeature, as the overview documentation states that variables like RAILS_ENV and NODE_ENV get set to 'production' on purpose. These should actually be treated as default ...
2
votes
Accepted
Horizontal autoscaling rails on GKE - specifically - web server choices and differences with conventional deployments
On GKE we have been supporting HPA with custom metrics since version 1.9. If you have a group of horizontally autoscaled pods inside your cluster each exporting a custom metric then you can set an ...
2
votes
running wordpress blog as directory location within nginx server configured for rails
You need to use alias to map URIs which begin with /blog to a root that ends with something else. See this document for more.
The cleanest solution is to use a nested location block. The ^~ modifier ...
2
votes
Should I expect Google App Engine to randomly restart instances?
According to the documentation there are 2 main reasons for an unexpected restart:
Instances restarted on a weekly basis [1].
A health check giving an HTTP code different from 200 [2].
If you ...
2
votes
Why is bundler failing to find rake while deploying with Capistrano?
I had a similar problem, also after updating.
It turned out that I did not have the ruby version set for rbenv in the capistrano configuration exactly matching what had been installed on the server.
...
2
votes
mysql root password is empty
Some installations default to enabling the MySQL (and MariaDB) socket authentication plugin.
Rather than using password authentication it is sufficient to be logged in as root on the operating system (...
2
votes
Rails 6 - Understanding AWS Pricing for CDN video on demand application
AWS CloudFront pricing is here. Key points:
Traffic S3 -> CloudFront is free
The first 1TB of traffic per month from CloudFront to users is free
Beyond that you pay per byte downloaded by users - ...
2
votes
Accepted
nginx in front of Rails
Why do you think that the configuration of your origin server has anything to do with the protocols of the reverse proxy in front of it?
Just configure mypage.com and secure.mypage.com as different ...
1
vote
Accepted
Nginx proxy depending on the domain name
Depending on which DOMAIN (?) :
server {
listen 80;
server_name .domain1.com; # Wildcard domain
return 301 $scheme://$host:3000$request_uri;
# use $host above because we use a ...
1
vote
Nginx proxy depending on the domain name
You've said you want your sites on different ports, and that you want them linked to port 80. This isn't clear.
Nginx can listen on port 80 for different websites, you simply configure it with ...
1
vote
Passenger could not spawn process for application. Rails, ubuntu, passenger and apache
Please post the following from your httpd.conf or other configuration file for the given apache server:::
StartServers ?
MinSpareServers ?
MaxSpareServers ?
Could be you are ...
1
vote
trying to diagnose weird nginx 110 connection timeout error somehow related to redirection
in your config/puma.conf there is the last block (on_worker_boot). You can remove it to have a temporary fix.
1
vote
trying to diagnose weird nginx 110 connection timeout error somehow related to redirection
Try this
upstream puma {
server unix:/home/chris/Rails/chrisbim2ree/shared/tmp/sockets/chrisbim2ree-puma.sock;
}
Here's one I have defined as an example
upstream php-fpm {
server unix:/var/run/...
1
vote
Postgres doesn't shut down properly
The file /usr/local/var/postgres/postmaster.pid is not a PID in itself, it is a text file that contains a PID. In this case it seems to be 1167. Try cat /usr/local/var/postgres/postmaster.pid. The ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
ruby-on-rails × 911nginx × 262
phusion-passenger × 238
apache-2.2 × 199
ruby × 123
ubuntu × 105
unicorn × 66
linux × 57
amazon-ec2 × 49
amazon-web-services × 46
redmine × 43
mysql × 41
ssl × 31
capistrano × 29
centos × 25
debian × 25
deployment × 24
rvm × 24
php × 22
web-server × 21
rubygems × 20
mongrel × 18
elastic-beanstalk × 17
gem × 17
hosting × 16