Welcome! Log In Create A New Profile

Advanced

Re: rewrite difficulty

Jonathan Matthews
April 30, 2013 10:02AM
On 30 April 2013 03:36, tseveendorj <tseveendorj@gmail.com> wrote:
> Hello,
>
> I have difficulty to convert apache like rewrite to nginx. This is my config
> file of virtualhost on nginx. http://pastebin.com/HTtKXnFy

OMFG. You win today's prize for "Nginx config I am least likely even
to /try/ and change". Congrats! ;-)

> My installed php script should have following rewrite
> http://pastebin.com/M2h3uAt3
>
> Currently any requested php code displayed it's source on browser. How could
> I migrate ?

You need to start small. Learn how Nginx does its thing in one small
area and when you've understood that, move on the next.

At the moment, you have literally picked up your apache config and
dumped it into Nginx's config syntax. You are unlikely to succeed if
you don't learn how to work *with* Nginx, instead of trying just to
make it behave like Apache.

This may not be the "here's your config; I fixed it" reply you were
looking for, but it's the best I can give you. Your Nginx config is
/horrible/, and I'm not going to spend my time deciphering it! :-)

Have a *really* good read of
http://nginx.org/en/docs/http/ngx_http_rewrite_module.html#rewrite and
http://wiki.nginx.org/HttpRewriteModule. They'd be good places to
start ...

J
--
Jonathan Matthews // Oxford, London, UK
http://www.jpluscplusm.com/contact.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

rewrite difficulty

Eberx April 29, 2013 10:38PM

Re: rewrite difficulty

Jonathan Matthews April 30, 2013 10:02AM

Re: rewrite difficulty

Eberx August 01, 2013 03:12AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 156
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready