Welcome! Log In Create A New Profile


Re: mod_rewrite with Nginx?

March 27, 2016 04:12PM
Copy-pasting configuration of using pre-cooked one is always a bad idea
since you do not understand what you are dealing with.

The same applies to automatic conversion tools since the paradigm behind
the Apache Web server is totally different from the one from nginx: there
is no one-to-one relationship (bijection) between the way to redact Apache
configuration directives and nginx' ones, so the very idea of such a tool
is flawed. Too bad people keep trying to provide their attempt at it
without thinking about that first.

You deleted the first pastebins you provided. People reading the thread
entirely thus cannot get a hang on your initial question. If you do the
same about the last one, the whole thread will transform into junk for
future reference.
Now, about the configuration you provided in the last pastebin:

1. For the list of console names, a single rewrite at server level would
have proven enough. You could have transformed it into a regex location +
rewrite to take advantage of the precedence of location blocks depending on
their type/modifiers
2. You could have grouped all the location blocks doing a similar jobs
3. You do not provide a location dealing with the index.php file, so the
default behavior would be for nginx to serve that file
4. You do not provide the whole configuration as there is no http block
(which contains the server ones) nor do you provide what is in the included
files at the end of it (particularly the one php.conf one whoch could prove

​Please take some time to read nginx docs http://nginx.org/en/docs/ to
get a hang on the basics.​ There even is a 'Beginner's Guide' to help you
Generic tip: it is usually a good idea to prepare a minimal configuration
depicting your problem rather than sending a huge, incomplete,
configuration fil which is, in the end, useless. You are not encouraging
people to help. Do your homework to show people you tried solving your own
problem and saving as much of their time as possible.

​My 2 cents,
*B. R.*

On Sat, Mar 26, 2016 at 11:26 PM, Askancy <nginx-forum@forum.nginx.org>

> Hi, thanks for the reply, I used it ... but it still does not work ...
> This is my new conf: http://pastebin.com/93b58G68 but it does not work...
> Posted at Nginx Forum:
> https://forum.nginx.org/read.php?2,265668,265671#msg-265671
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
nginx mailing list
Subject Author Posted

mod_rewrite with Nginx?

Askancy March 26, 2016 12:55PM

Re: mod_rewrite with Nginx?

JoakimR March 26, 2016 06:14PM

Re: mod_rewrite with Nginx?

Askancy March 26, 2016 06:26PM

Re: mod_rewrite with Nginx?

B.R. March 27, 2016 04:12PM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 69
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready