Tag Info

Hot answers tagged

5

Looks like everything under /wp-content/ is throwing a 301 redirect. Look there for what is likely a malicious .htaccess file - may be a breached account or a vulnerability in WordPress allowing upload (make sure your WP is fully up to date). Beyond that - depending on the attack vector, there may be more aspects of the system compromised; the conventional ...


5

It looks like the problem is caused because when you added your open all line you used iptables -A INPUT ... which has dutifully added it to the end of the INPUT chain right after the REJECT all rule. As iptables works on first match wins your accept all rule is never matched so port 3000 is blocked. You should use iptables -I... to insert rules into a ...


4

Security through obscurity is not security. That being said, if you are seeing a lot of malicious attempts, I would examine all logs from the source IP's of the problem children regularly and carefully, looking for cases of successful actions... success from those sorts of places would be bad.


4

You just have to register AdminUser as a manageable resource: $> rails generate active_admin:resource AdminUser Then, just customize the whole thing but remember that both 'password' and 'password_confirmation' field have to be present in the form if you want to be able to manipulate passwords - you decide if that's a good idea. I did it like this but ...


4

It sounds like your application needs better design and lacks appropriate parallelism unless you're actually rendering those pages in some way, and even then I think you should be able to surpass 8 per second if you uncouple the downloading from the final render -- interactivity is not a priority. You are best served by ensuring proper parallelism in your ...


3

It's unusual to go co-lo with only one server and only one sysadmin. The point at which it seems worthwhile to me is at about 20 servers and two sysadmins. Some of the benefits that having your servers managed can provide you are: 24/7 monitoring Remote hands In-stock spare parts Backups With only one server, your backups are tied to the same hardware ...


3

I'm trying to segment a few servers for a Rails project and part of that is entertaining the idea of isolating Resque workers to their own box. I already have Redis broken out, but is it common to put Resque workers elsewhere? I'm going to make this a bit more generic. Is it common to put job processing workers on different machines than the ...


2

There isn't a recommended tutorial. Since the system-provided ruby for Squeeze is a Ruby1.8, your Ruby 1.9 install will not be able to use system-ruby. You'll have to install 1.9 some other way, probably via rvm. At this point you're out of the land of "RoR on DebSqueeze" and into the land of "RoR on Apache on Linux", which is a much better documented ...


2

To prevent clients from forging a proxy's headers, both X-Forwarded-For and Client-Ip have to equal to not raise this kind of error. Simply set the Client-Ip header in your nginx config: As for the IP addresses in your log: 192.168.255.5 probably is NodeBalancer's internal IP (examples in Linode Library show 192.168.0.0/16 subnet as usual; that should ...


2

Aws can provide the scalability in case you need it Architecture suggestions use elb for first tier use two or more app servers (for redundancy reasons) use rds if you can Now ... If rds is not an option you will end up with a master db and a slave. For the db I recommend ebs volumes that are striped. Config management it can be anything really as ...


2

Based on the documentation, you will need to disable MultiViews on the passenger sites. Additionally, your DocumentRoot should point to the directory containing public--i.e., Passenger checks to see if the selected directory contains a passenger application by checking for {DocumentRoot}/../config/environment.rb, so verify that this is correct. If you're ...


2

All you need is a second server { block that's configured for SSL on port 443. You'll want a listen 443 ssl; directive and directives pointing to your public and private keys; ssl_certificate /path/to/webserver-cert.pem; and ssl_certificate_key /path/to/webserver-key.pem;.


2

Yes, you can use Apache and Passenger to run multiple Rails applications. If you only have one instance, then you don't need a load balancer, and name-based virtual hosting is orthogonal to the use of a load balancer. You can run Rails applications that require different versions on the one machine; there's probably no documentation because it's so ...


2

The "hacking attempts" you see in your logs are probably nothing to be concerned about. If everything looks like it was run by some kind of automated script, following good security practices (such as those found in the Rails Guide) is probably adequate. However, if you see evidence that someone is targeting you specifically, I'd take it more seriously. ...


2

Fedora 16 has migrated to systemd from traditional init.d layout, so you should run su - postgres -c "PGDATA=/var/lib/pgsql/data initdb" directly, see Fedora wiki


1

I'd start by tracing the request-path through the entire stack. It could look something like this: The request is received at TCP/80 on Websrv. Nginx is bound to TCP/80 and processes the request The request is handled by these specific directives in the config file The request is passed off to Passenger, where it enters the Ruby environment If I had to ...


1

10.X.X.X is a local network address, so without being inside your building, we can't tell what it is from here Look in the nginx access logs -- is nginx logging multiple requests happening? If so, looking at the user-agent string should tell you what software is making them


1

Reading the link you provide it says For PostgreSQL version 9.0 and above, the <name> is postgresql-9.0... and later is says service <name> initdb so I'm guessing you want service postgresql-9.0 initdb


1

Check your config/database.yml, the development and production environment might have different DB settings. Remember to create the database in production env(RailsEnv), or just copy the credentials under development section to production section in config/database.yml Installing PG & Apache as root is nothing wrong, that's the right way to protect ...


1

I don't know how it works on Mac, but on Linux the EnterpriseDB installer leaves an uninstall script, possibly linked to some menu entry. You should look for that. The two installations should be able to coexist peacefully. But if you don't need the installation, you should consider removing it, as a matter of course. In general, I do recommend using ...


1

# portsnap fetch extract # cd /usr/ports/www/rubygem-rails # make install clean


1

It's quite easy, since Passenger 3.2 will support different ruby versions out-of-the box. Only thing is, 3.2 has not been released yet. Just make sure you set the proper passenger_ruby and RVM/Capistrano can do the rest. Read more in this article: http://ariejan.net/2012/05/11/running-a-different-ruby-with-passenger-3-2-and-rvm Note that I do run 3.2 on ...


1

"System user" is a very ambiguous statement. Regardless, a general rule of thumb is to give each service its own specific user, and that user should only have permissions to its own application space (i.e., your apache user shouldn't be able to mess with what your bind user controls, and vice versa). Moreover, those users shouldn't have any "system" ...


1

No, this is not possible. Either run it from inside Apache (e.g. with passenger) or use Apache as a proxy to route it to another port. However, if you don't use SSL at all on Apache (and that port is unused), you can run your app on port 443 if it also does the SSL, as port 443 is assumed if you give an HTTPS URL.


1

If you are using passenger here is what I had to use to get it working on www.mysite.com without using www.mysite.com:80 on a centos server: In etc/httpd/conf the key was to uncomment the NameVirtualHost *:80 and change the * to my server's IP address. Make sure Listen 80 is uncommented. Also add your ip to the VirtualHost tag. It must be running on port ...


1

I used the instructions here: http://jordanhollinger.com/2011/04/22/how-to-use-thin-effectivly to create a configuration file and start thin as a normal service at server boot. To get started, one would run: thin install It should set up a start up file in hopefully the proper directory, and tell you where it is. For me, in CentOS/Fedora I had to move ...


1

You don't need help picking a server. You need to learn how to profile your application to isolate performance issues. It is possible to cover up problems like to with a bigger server. But there is now way anyone here can give you an easy answer on how to tell which package to upgrade to. You will need to test it out yourself to find out. See Can you help ...


1

I haven't used haproxy, so take this with a grain of salt, but it looks like you're telling haproxy to use a header named 'X-Client', not 'X-Forwarded-For'. Either change the rails app to look for X-Client or change haproxy to use X-Forwarded-For. Source: https://code.google.com/p/haproxy-docs/wiki/forwardfor



Only top voted, non community-wiki answers of a minimum length are eligible