Welcome! Log In Create A New Profile

Advanced

Need to change some rewrite rules from apache to nginx for request_uri

Posted by pavan.d 
Need to change some rewrite rules from apache to nginx for request_uri
February 23, 2011 09:15AM
Hi Experts,

I have to convert below apache config into nginx. I am having trouble to convert these rewrite rules into nginx. Please anyone help me on this.

<VirtualHost *>
DocumentRoot /var/www/html/downpage
ServerName downpage-7775.example.com
CustomLog /var/log/httpd/downpage/access Combined
ErrorLog /var/log/httpd/downpage/error_log

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/server-status
RewriteCond %{REQUEST_URI} !maintenance.png
RewriteCond %{REQUEST_URI} !^/index.html
RewriteRule ^/(.*) http://%{HTTP_HOST}/index.html [L]

<Directory "/var/www/html/downpage">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

</VirtualHost>


Thanks in advance.
Pavan
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 75
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