Reputation
1,657
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
1 5 18
Newest
 Nice Answer
Impact
~129k people reached

Apr
27
comment Why this nginx rewrite rule add trailing slash?
Sure. Glad to know it worked.
Apr
27
comment Nginx & PHP-FPM: Query parameters won't be passed to PHP
Turning on debugging and watching the log would help. nginx.org/en/docs/debugging_log.html . Most distributions come with debugging pre-compiled.
Apr
27
comment Why this nginx rewrite rule add trailing slash?
Look at the location block. You are matching a / and then inside the block too, you are matching a /. If you need to eliminate /, you need to ignore it somewhere. Probably, you are looking for the following solution... location / { rewrite ^/?(.*) https://example.com/ar$1 permanent; }.
Apr
24
comment Nginx redirects http request to one vhost
Are you sure that it is Nginx that does the redirect?
Apr
24
comment Installing SSL certificate on nginx server
Your site works fine. So, it was likely the DNS propagation issue. You may want to mark @EEAA's answer as the correct answer, since it helped you.
Apr
24
comment nginx - Allow any http-traffic that is not x-forwarded-for
What have you tried so far? What's your current config?
Jan
2
comment Varnish, Nginx & SSL
While Varnish doesn't support SSL, it can be used along with Nginx and SPDY. For such a setup, the server stack would look like... Nginx (for SSL termination) => Varnish (for caching) => Nginx (as a simple web server) => application. I hope that helps!
Nov
6
comment How can I set up Varnish to cache only static content?
What have you tried so far?
Nov
4
comment Cache Busting and Include Files for Nginx
If someone's answer helped to arrive at the solution, remember to upvote and / or select it as the best answer!
Oct
29
comment Bash -x to file and email
Can you get some idea from gnu.org/software/bash/manual/html_node/Redirections.html ?
Oct
28
comment nginx codeigniter rewrite: Controller name conflicts with directory
Can you post your Apache rewrites?
Oct
28
comment Add separate domain name to Wordpress admin area with htaccess
` Can this be done with Wordpress?` No, this can't be done with WordPress.
Oct
28
comment NGINX SSL Certificate Not Working
Have you opened port 443 in your firewall?
Oct
27
comment Multiple SSL vhosts using wildcard certificate in nginx
This wouldn't work. A vhost needs ssl_certificate and ssl_certificate_key that should be configured inside server or http location. In your example, you have declared it inside the first server location, but didn't declare it for the other two vhosts.
Oct
27
comment Images don't display but can see them using their URLs
Welcome to ServerFault, Maaz! all these images have the 777 permission Please never set 777.
Oct
25
comment Nginx redirect one path to another
Using if along with return directive is perfectly fine. See wiki.nginx.org/IfIsEvil . Yes, IMO, it's better than using rewrite.
Oct
25
comment Nginx redirect one path to another
Nope. It won't. If you really want to retain any queries upon permanent redirects, see this little trick... gist.github.com/pothi/7152399
Oct
25
comment What are the IPv6 Public and Private and Reserved ranges
Welcome to ServerFault! Instead of linking to another question in ServerFault, you may flag a question as a duplicate (after you get that privilege, of course).
Oct
25
comment Nginx + Nagios : 502 Bad gateway
Configuring Nagios in Apache may be straightforward as mentioned in that Linode article. It isn't the same with Nginx. You may have a look at this sample configuration (gist.github.com/mrbichel/1754118) and customize it for your specific use-case.
Oct
25
comment Nginx - Adding a trailing slash to urls on HTTPS
Odd indeed. Please try if ($uri !~* "/$") { return 301 $scheme://domainname.tld$uri/; } instead of the rewrites.