Need Nginx Configuration Help

Discussion in 'Nginx' started by rajin, Feb 18, 2013.

  1. #1
    apache is consuming too much of my resources and i am already warned by vps provider
    i tried converters as well as fw articles to convert the code but all attempts went futile. so anyone can convert this apache .htaccess into nginx conf ?

        Options +FollowSymLinks
        RewriteEngine on
        RewriteRule ^mangas/([^/]+)/([^/]+)/$ - [F,L]
        RewriteRule ^mangas/([^/]+)/$ - [F,L]
        RewriteRule ^mangas(/?)$ - [F,L]
       
        RewriteRule ^([^/.]+)/([^/.]+)/([0-9]+)(/?)$ read-manga.php?manga=$1&chapter=$2&page=$3 [L]
        RewriteRule ^([^/.]+)/([^/.]+)(/?)$ read-manga.php?manga=$1&chapter=$2 [L]
        RewriteRule ^([^/.]+)(/?)$ read-manga.php?manga=$1 
    
    PHP:

     
    rajin, Feb 18, 2013 IP
  2. ryan_uk

    ryan_uk Illustrious Member

    Messages:
    3,983
    Likes Received:
    1,022
    Best Answers:
    33
    Trophy Points:
    465
    #2
    Have you tried this?
    http://winginx.com/htaccess

    Note: It will only convert rewrite rules and not the whole of a .htaccess file, so make sure you just include the rewrite rules.

    You can read more about rewriting in Nginx here.
     
    ryan_uk, Feb 18, 2013 IP
  3. abonk

    abonk Member

    Messages:
    48
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #3
    my favorite converter (htaccess to nginx conf) is
    http://www.anilcetin.com/
    Code (markup):
    , for general use ist work, but not for special rules in httaccess.
     
    abonk, Feb 19, 2013 IP
  4. rajin

    rajin Well-Known Member

    Messages:
    242
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #4
    both tools i have already tried .
     
    rajin, Feb 22, 2013 IP
  5. ryan_uk

    ryan_uk Illustrious Member

    Messages:
    3,983
    Likes Received:
    1,022
    Best Answers:
    33
    Trophy Points:
    465
    #5
    What's the problem? Did you try to convert more than just the rewrite rules?
     
    ryan_uk, Feb 24, 2013 IP
  6. rajin

    rajin Well-Known Member

    Messages:
    242
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #6
    ryan got someone's help and did hell of tweek here and there and was able to run it at last
     
    rajin, Mar 5, 2013 IP