Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a dedicated server that is running on Apache, I heard Nginx is uses less resources and gives 10 times better results on the same hardware.

Is it possible for me to replace Apache with Nginx? Will it effect any data or settings of my server?

share|improve this question

3 Answers 3

This depends on your server configuration (virtual hosts, rewrite, etc..). You need to configure nginx in the same way you configured apache (after finding the equivalent directives in nginx).

If you failed to do so, you may end up by having your website(s) not running as expected or not running at all.

share|improve this answer

Yes you can install nginx on a server at the same time as having apache installed. You can also have them both running at the same time - The only restriction is that they cannot both be listening to the same port.

Yes you can replace apache with nginx, just as you could replace it with almost any webserver.

No your data will not be affected (assuming you mean your application's data)

Yes the settings of your server will be affected - the config files for apache cannot be read by nginx.

If you want to try out nginx, the simplest way to do so is simply to install it to a different port. E:g. find the listen directive and put:

listen 81;

It will then run alongside your existing apache install - you can load http://example.com (apache) and http://example.com:81 (nginx) to check for errors etc. If you are happy that things are working, you can then turn off apache, change it to listen on port 80 and there should be no noticeable impact (except perhaps better performance) to visitors to your web.

share|improve this answer

Is it possible for me to replace Apache with Nginx?

Short answer: Yes!

Will it effect any data or settings of my server?

Short answer: No!

With careful planning and testing, you can migrate all the settings to Nginx. The data wouldn't be affected, though.

In Apache there are certain things are handled much easier such as rewrites. In Nginx, rewrites need to be manually created.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.