Re: apache rewrite to nginx

2017-06-14 Thread frank3427
Aleks, How does this look? server { listen *:443 ssl; server_name ~^(?rwa|m2m|dwa)-(?\w+)-(\w+)\.(?(diasranch.net))(:\d+)?$; proxy_read_timeout 86400s; proxy_buffering off; #access_log /logs/ssl_access.log; error_log/logs/ssl_error.log error; ssl_protocols

Re: apache rewrite to nginx

2017-06-14 Thread Aleksandar Lazic
Hi frank3427. frank3427 wrote on 14.06.2017: > so far I have come up with the following but , I have been reading that > using if statements is bad. > > if ($http_host ~ "^rwa-(.*)"){ > set $rule_0 1; > set $bref_2 $2; > set $bref_7 $7; > } > if ($http_host ~ "^m2m-(.*)"){ > set $rule_0 1; > set

Re: apache rewrite to nginx

2017-06-14 Thread frank3427
so far I have come up with the following but , I have been reading that using if statements is bad. if ($http_host ~ "^rwa-(.*)"){ set $rule_0 1; set $bref_2 $2; set $bref_7 $7; } if ($http_host ~ "^m2m-(.*)"){ set $rule_0 1; set $bref_2 $2; set $bref_7 $7; } if ($http_host ~ "^dwa-(.*)"){ set $rul

Re: apache rewrite to nginx

2017-06-14 Thread frank3427
Alex, I have a LUA version of the PHP script. I am not sure about the multiple rewrite or conditions Posted at Nginx Forum: https://forum.nginx.org/read.php?2,274815,274870#msg-274870 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mai

Re: apache rewrite to nginx

2017-06-12 Thread Aleksandar Lazic
Title: Re: apache rewrite to nginx Hi Frank Dias. Frank Dias wrote on 12.06.2017: I need some help, migrating from Apache to Nginx. The following logic is in Apache, how do I convert to Nginx Where do you stuck? Have you tried this docs to start? http://nginx.org/en/docs/http

apache rewrite to nginx

2017-06-12 Thread Frank Dias
I need some help, migrating from Apache to Nginx. The following logic is in Apache, how do I convert to Nginx DocumentRoot "/var/www/default" ServerName *.diasranch.net SSLProxyEngine On ProxyPreserveHost On RewriteEngine on RewriteMap host_finder prg:/usr/local/bin/host_finder.php # Rule to hand

Re: Convert Apache rewrite to NGinx

2013-03-06 Thread GASPARD Kévin
Hi, On Sun, Mar 03, 2013 at 07:38:39PM +0100, GASPARD kévin wrote: Hi there, >Probably a single extra try_files line will work for you. This is my new config file : location ~ \.php$ { try_files $uri $uri/ /index.php?q=$uri&$args; } You will probably

Re: Convert Apache rewrite to NGinx

2013-03-03 Thread GASPARD kévin
Le Sun, 03 Mar 2013 19:59:17 +0100, Steve Holdoway a écrit: Why not just use the wp config examples in the docs? Both Wordpress and nginx offer them. Well, I forget to check that... Sorry. Anyway, I've found this: Steve On 4/03/2013, at 7:38 AM, GASPARD kévin wrote: Thanks for yo

Re: Convert Apache rewrite to NGinx

2013-03-03 Thread Francis Daly
On Sun, Mar 03, 2013 at 07:38:39PM +0100, GASPARD kévin wrote: Hi there, > >Probably a single extra try_files line will work for you. > This is my new config file : > location ~ \.php$ { > try_files $uri $uri/ /index.php?q=$uri&$args; > } You will probably find

Re: Convert Apache rewrite to NGinx

2013-03-03 Thread Steve Holdoway
Why not just use the wp config examples in the docs? Both Wordpress and nginx offer them. Steve On 4/03/2013, at 7:38 AM, GASPARD kévin wrote: > Thanks for your reply. > >> On Sun, Mar 03, 2013 at 01:52:48PM +0100, GASPARD kévin wrote: >> >> Hi there, >> >>> Using nginx 1.2.1 on Debian Whe

Re: Convert Apache rewrite to NGinx

2013-03-03 Thread GASPARD kévin
Thanks for your reply. On Sun, Mar 03, 2013 at 01:52:48PM +0100, GASPARD kévin wrote: Hi there, Using nginx 1.2.1 on Debian Wheezy 64 bits. My wordpress need rewrite, it gave me this: # nginx configuration location / { if (!-e $request_filename){ rewrite ^(.*)$ /index.php break

Re: Convert Apache rewrite to NGinx

2013-03-03 Thread Francis Daly
On Sun, Mar 03, 2013 at 01:52:48PM +0100, GASPARD kévin wrote: Hi there, > Using nginx 1.2.1 on Debian Wheezy 64 bits. > > My wordpress need rewrite, it gave me this: > # nginx configuration > > location / { > if (!-e $request_filename){ > rewrite ^(.*)$ /index.php break; > } > }

Convert Apache rewrite to NGinx

2013-03-03 Thread GASPARD kévin
Hi, Using nginx 1.2.1 on Debian Wheezy 64 bits. My wordpress need rewrite, it gave me this: RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] I've tried to convert it with this