Home » Tag Archives: nginx

Tag Archives: nginx

Install nginx as reverse proxy in cPanel

The web-hosting control panel’s default web-server is Apache. cPanel/WHM doesn’t have native support on Nginx, but we can install and configure it so that it will improve the server performance. Why run Apache and Nginx together? Is there any advantage by using Nginx as reverse proxy on Cpanel? Both Apache and Nginx are powerful and effective web-servers. Apache is the topmost webserver …

Read More »

Linux: Restart Nginx WebServer

How do I restart nginx web server under Linux? To restart nginx web server use any one of the following command as a root user: # /etc/init.d/nginx restart However, recommed way is as follows which should work with any Linux distribution : # nginx -s reload OR # /usr/local/nginx/sbin/nginx -s reload Originally posted 2016-03-10 02:57:42.

Read More »

Nginx Redirect URL With HTTP/1.1 301 Moved Permanently Header

How do I redirect old ugly urls such as http://example.com/store/view.jsp?product=foo with clean url – http://example.com/store/view/product/foo using nginx reverse proxy? You need to use HttpRewriteModule under nginx web server. This module makes it possible to change URI using regular expressions (PCRE), and to redirect and select configuration depending on variables. The syntax is as follows to chage URI in accordance with …

Read More »