Whichone better, Apache or NginX?

Status
Not open for further replies.

dharis01

New member
I'm newbie here, I need help. I just tried to get experience in CentOs 7, I want to learn more to increase my ability.

I have tried, NginX and Apache, I got some error. Anyone explaint to me, what defferent Apache and Nginx, and whichone better?
 

Genesis

Administrator
Staff member
dharis01 said:
I'm newbie here, I need help. I just tried to get experience in CentOs 7, I want to learn more to increase my ability.

I have tried, NginX and Apache, I got some error. Anyone explaint to me, what defferent Apache and Nginx, and whichone better?
Very easy to Google it dharis. Suggest you do searches on it. You could start with this search:

Code:
Difference between Nginx and Apache

https://www.google.com/search?q=difference+between+nginx+and+apache&ie=utf-8&oe=utf-8

Then if you are posting for VPS hosting here, PLEASE read our Guidelines for Quality Posts and Forum Rules before you make any further posts. You'll note that inquiries like the one you've just made don't earn you any quality credits.
 

smalpierre

New member
Better is a relative term. Are apples or oranges better?

That being said - If I were you, I'd start with Apache. It's the most widespread, so there are more resources available. It's also easier to set up for server side code like PHP.
 

jakarta

New member
There is a good reason beetween apache or Nginx .

Apache is Good but this is need more resource . I like Nginx but i still learned about this ( url_rewrite and other about it)
 

smalpierre

New member
nginx out of the box will serve static pages faster. Some high traffic sites serve static content from nginx and dynamic content from apache.

Somebody just getting started is probably better off using what most everybody else is using. Easier to get help. It's also easier to set up PHP and it runs it faster. Much faster depending on your configuration. I set my box up like this: https://blog.kmp.or.at/2013/06/apac...y-w-php-fpm-fastcgi-apc-and-a-kind-of-suexec/

This setup works pretty good, but I think the opcode cache is shared.
 

ogah

New member
jakarta said:
There is a good reason beetween apache or Nginx .

Apache is Good but this is need more resource . I like Nginx but i still learned about this ( url_rewrite and other about it)
if you can make permalink / url rewrite in apache only whith this htaccess, you will easy to make permalink in nginx
Code:
RewriteEngine on
RewriteBase /

RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
 

kokakoda

New member
They're both good in their own way.

Like smalpierre said, Apache's the 'standard' and you'll find plenty of docs on it, although it's maybe overkill depending on your use case. lighttpd is similar but much less taxing on your system.

nginx is /fast/ and is great for serving up static content, but the syntax can be confusing if you're mostly used to the Apache style.

If you can, learn both. It's common to set up nginx in front of Apache so you get the best of both worlds.
...and I just realised I pretty much repeated what was said 2 posts ago. oops :blush: Leaving it anyway, consider it my +1.
 

smalpierre

New member
kokakoda said:
They're both good in their own way.

Like smalpierre said, Apache's the 'standard' and you'll find plenty of docs on it, although it's maybe overkill depending on your use case. lighttpd is similar but much less taxing on your system.

nginx is /fast/ and is great for serving up static content, but the syntax can be confusing if you're mostly used to the Apache style.

If you can, learn both. It's common to set up nginx in front of Apache so you get the best of both worlds.
...and I just realised I pretty much repeated what was said 2 posts ago. oops :blush: Leaving it anyway, consider it my +1.

Setting up server side scripting in Apache is super easy, and it runs faster than Nginx since you're basically setting up CGI apps in Nginx - running PHP out of process, and calling the interpreter every time a script is requested. If you spend the same time configuring Apache to run fastCGI and opcode cache - it'll be even faster than it was before.

I'll never use Nginx unless I find a need to serve up huge amounts of static content.

At one point I was working on a big Java app that did something similar. Static content was served by Apache directly, content that used the back end would run from the Tomcat app server - which is SLOW to serve static content (and slow to serve dynamic content at that)
 

T.Kawabata

New member
I recommend apache if you are beginner because you can search more information from internet.
If you want to handle many users and processes , I recommend NGINX
 

xhunter

New member
prefer for nginx because i hear that nginx is far more newer than apache?
isn't that right? Correct me if i was wrong :D
 

Genesis

Administrator
Staff member
Suggestion is that you figure out what you want to do first. Then do some research by Googling as to what you need. Suggestion by another user was that for those who are beginners, Apache is better. There is also much more documentation available for Apache.

Am going to close this thread to prevent spam. If any one wants it to be reopened, please PM me.
 
Status
Not open for further replies.