due to low memory on my virtual machine, I was researching migrating
away from Apache.
What kind of surprises me, and pardon my ignorance, I didn’t lookup
much beyond the FAQ, and a few Wiki links, and web searches. I was
hoping to find scripts that migrate my Apache configuration files into
Nginx configuration files, so I could be up and running kind of
immediately.
There are a few virtual domains, and a bunch of existing
configuration, that I would like to migrate, e.g. URL rewrites,
caching policies, proxies, etc. that I would not want to dive into,
just now, as it’s not exactly trivial, to do all of that, check it
all, and to not make a lot of mistakes.
Don’t get me wrong, I don’t think I shouldn’t learn the Nginx
configuration format, it’s just that I would as a starting point, like
to use a working one that resembles what I had.
So if it’s possible, I would welcome pointers… thanks in advance!
I was hoping to find scripts that migrate my Apache configuration files into
Nginx configuration files, so I could be up and running kind of immediately.
Some tools were reported on the mailing list earlier, but I haven’t
checked them.
Like with all automatically tools you should take a look at it before
putting the result in production.
I just picked a .htaccess converter for you: Winginx - Local web server for PHP5, MySQL, MongoDB, Node.js developers
But I would really recommend you to spend a weekend (as of tomorrow
until Sunday? ^^ At least here in Germany we have a bank holiday
tomorrow …) to write a simple config, test it and expand it to your
needs. It will help you debugging later, I guess.
I was just about to suggest the same tool to convert .htaccess… but
has
warned in the website it does not convert everything and also it does
not
check syntax errors, so It might be even worst.
I would suggest not to use any ready-to-use-conversion-tools but rather
learn the differences and convert the hosts manually one by one. It took me
a couple of days to convert all of our sites to nginx and two weeks more to
realize the differences of Apache and Nginx handling very specific cases,
such as PHP environment in particular scenario where old PHP scripts would
rely on SCRIPT_URI/SCRIPT_URL that is not available in nginx, or scripts
using PATH_INFO/PATH_TRANSLATED, and these have to be correctly set.
I am glad to say that I use only static pages with Nikola, and that no
php is on
my site at all. I need reverse proxies though, and virtual hosts for
git, and so
on.
If you do not want to spend valuable time for learning and adopting, you may
always rely on reliable users with experience
I am not so sure, if it’s really worth it. But I think I am sold on
trying it out anyway,
and will learn how to do things then. Lets see, how that works out.
I would suggest not to use any ready-to-use-conversion-tools but rather
learn the differences and convert the hosts manually one by one. It
took me
a couple of days to convert all of our sites to nginx and two weeks more
to
realize the differences of Apache and Nginx handling very specific
cases,
such as PHP environment in particular scenario where old PHP scripts
would
rely on SCRIPT_URI/SCRIPT_URL that is not available in nginx, or scripts
using PATH_INFO/PATH_TRANSLATED, and these have to be correctly set.
If you do not want to spend valuable time for learning and adopting, you
may
always rely on reliable users with experience
Andrejs
loco (at) andrews.lv
Posted at Nginx Forum:
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.