1 |
On Fri, Mar 8, 2013 at 3:55 AM, Alan McKinnon <alan.mckinnon@×××××.com> wrote: |
2 |
> On 08/03/2013 00:08, Grant wrote: |
3 |
>>>>>> Changing completely from a user-facing apache to a user-facing nginx |
4 |
>>>>>> sounds fraught with peril. |
5 |
>>> |
6 |
>>> The last time I set this up was for one of our e-commerce sites on Centos. |
7 |
>>> |
8 |
>>> It went like this: |
9 |
>>> |
10 |
>>> install nginx |
11 |
>>> vi config file |
12 |
>>> change obvious stuff |
13 |
>>> tweak location of nginx and backend web server |
14 |
>>> restart stuff |
15 |
>>> stuff worked |
16 |
>>> |
17 |
>>> Even the SSL certs was mind-bogglingly easy. Copy it over to nginx. |
18 |
>>> Sorted. Done. |
19 |
>>> |
20 |
>>> Lucky for me, I could firewall off the backend web server from the |
21 |
>>> entire world so users never see it directly. This let me dispense with a |
22 |
>>> CE signed cert for the backend and just create my own. |
23 |
>> |
24 |
>> So you're saying nginx listens on 80/443 and apache listens on |
25 |
>> 1000/1001 (for example) and you firewalled 1000/1001 from all but |
26 |
>> localhost? |
27 |
>> |
28 |
>> Can I use the same SSL certs with nginx that I've been using with apache? |
29 |
> |
30 |
> |
31 |
> Yes, that's exactly correct. |
32 |
> |
33 |
> |
34 |
>> |
35 |
>> - Grant |
36 |
>> |
37 |
>> P.S. Thanks for the shot of courage. |
38 |
> |
39 |
> |
40 |
> |
41 |
> -- |
42 |
> Alan McKinnon |
43 |
> alan.mckinnon@×××××.com |
44 |
> |
45 |
> |
46 |
|
47 |
Unless you have a special reason to use Apache, Nginx plays well with |
48 |
most modern webapps. |
49 |
And it has a module for uwsgi which is an amazing protocol. The uwsgi |
50 |
process manager can run pretty much every bloody app (incl PHP!). |
51 |
|
52 |
I have been using nginx exclusively on all my servers and I've been |
53 |
running PHP, Python and Ruby apps without any glitch. But I prefer |
54 |
PHP's original FPM to uwsgi. |
55 |
|
56 |
-- |
57 |
Nilesh Govindrajan |
58 |
http://nileshgr.com |