• I’m planing to migrate from Apache to NGINX.
    Q1> How to migrate a WP Multisite from Apache to NGINX?

    Reasons: Faster, Lighter
    Drawbacks: No CGI, Subversion, WebDAV, .htaccess support
    #The CGI problem can be fixed by FastCGI
    #Subversion is not that important
    #WebDAV is kinda important but we can live without it.

    Q2> BUT what about .htaccess???

    Q3> What kinda problems i can face?

Viewing 15 replies - 1 through 15 (of 24 total)
  • There are quite a few guides out there that will give you the configs you need for nginx, so you will not longer use .htaccess.

    I am currently going through this process myself and having a hard time with the configs even though there are tutorials.

    The lead dev, Nacin, has already written a lengthy reply for a similar question about a week back.

    For your #Q2: htaccess files can be handled by try_files directive or rewrite directive. There is no automatic way to create these (like .htaccess file).

    For your #Q3: I have not got any issue when setting up the test environment of WP Multisite. I have no production server experience, yet! That’s why I linked Nacin’s reply.

    Update: For #Q1: You may follow the instructions found in http://wiki.nginx.org/WordPress. Again, I’m speaking only from my test environment knowledge. Thanks.

    Thread Starter WPtesting

    (@wptesting)

    Is there any way to test it locally? I mean is there any stack like WAMP?

    I had success installing Nginx in Linux locally. Not sure, if there is any stack that support Nginx in Windows.

    Thread Starter WPtesting

    (@wptesting)

    Missing “Ipstenu” and her experience in this area 🙁 But we have some experienced users like “Pothi Kalimuthu” 🙂

    I’m looking for a Windows solution.
    Interestingly .htaccess can be used in Engine-X if we configure it as a front-end proxy to Apache.
    Anyone is using it along with Apache?

      Thanks
    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    I’m using Apache and know sod all about nginx, which is why I had nothing to say. (When I don’t reply, it’s because (1) I don’t know or (2) I can’t be nice 😉 )

    Thread Starter WPtesting

    (@wptesting)

    I know both of these, that you are using Apache and having a quiet little experience with engine-x at this time. What I meant was, I’m missing your guidance in this topic as you are not not that familiar with it. And ya I know your rules btw 🙂

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Don’t do Windows either 🙂

    To be somewhat topical, when you asked ‘What issues will I face’ the biggest is support.

    By far, most of us use apache on linux for WordPress, and even more use it for Multisite. Totally made up numbers (gut feelings here): 70% of WP users use Linux, and 90% of Mutlisite users use linux.

    I do know, personally, 2 people who use nginx, one of them being wpmuguru.

    Thread Starter WPtesting

    (@wptesting)

    It seems another misinterpretation 🙂
    I’m using Debian on my server. When i said “I’m looking for a Windows solution.”, I was talking about My “Local System” to test NGINX on Windows . 🙂
    Obviously I’m a member of LAMP family, but want to join LEMP now 😛

    And ya I agree, support is the biggest issue!
    That’s why I’m looking for a proxy solution, like configuring it as a front-end proxy to Apache. So that unsupported requests will be handled by Apache thus we can use .htaccess and minimize all those migration issues.
    Would it be a good idea?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Double I don’t do windows then 🙂 I do use a Windows PC when I must, but my localhost is all MAMP.

    I’m gonna ask what Nacin would (he’s on vacation).

    Why do you think you need nginx?

    Thread Starter WPtesting

    (@wptesting)

    From my understanding,
    NGINX is more beneficial under requests based heavy load instead of process based load. OR simply, it’s beneficial for those who are running high-traffic(having/expecting) websites on VPS.

    Because Apache is heavier, slower and it consumes more CPU usage.
    Where NGINX:
    # improves “First Byte Time”.
    # “Scalability” as it’s asynchronous (event-based) server.
    # Engine-X helps to save resources (RAM, CPU) and improves overall performance.

    It seems Nginx can handle much more traffic as compared to Apache on same H/W configuration. 🙂

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Yeah, but … are you having that load where you need it?

    I haven’t pegged out apache yet, and I can take 40k hits in n hour without a glitch. On a VPS.

    Thread Starter WPtesting

    (@wptesting)

    I’m using 512mb RAM & my VPS restarts at least 1 to 2 times a day due to heavy load. I optimized my site in order to reduce the processing based load AMSP.

    Ya, a little more memory could have fixed this problem easily, But I’m expecting more high traffic in near future.

    And last reason, but not the least, my nickname describes myself 🙂

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Okay. What server side caching do you have?

    I have an 800mb RAM box, though it’s on a cloud/burst setup right now, so it’s usage is weird. When I was on traditional VPS, though, I had 512mb and never used more than 60% on a big day. THAT SAID.

    httpd.conf is generally NOT optomized for WordPress. Your min and max servers, plus child settings, often need to be heavily tweaked. On top of that, I found that installing some sort of caching for PHP was critical. I use APC (it’s built into PHP) and it took my average load from 75% memory to 40%. Also I turned off Clam and ClamAV (which have never actually helped me), as well as things like Entropy chat and other Cpanel/WHM features that cause bloat.

    You can also use nginx as a front end caching proxy server to apache. Now THAT is fun. 🙂

Viewing 15 replies - 1 through 15 (of 24 total)

The topic ‘Apache to NGINX’ is closed to new replies.