Want to subscribe to topics you're interested in?
Become a Member

nginx rewrite

Discussion in 'Other Web Apps usage' started by Lundz, Jun 10, 2014.

  1. Lundz

    Lundz Member

    42
    6
    8
    May 28, 2014
    Ratings:
    +7
    Local Time:
    11:19 AM
    Hello guys :)

    Does anyone of you know places to learn about nginx configurations in general.. I need to learn it as i need custom rewrite configurations and i can't quite figure them out yet.. :)
     
  2. eva2000

    eva2000 Administrator Staff Member

    29,033
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,782
    Local Time:
    7:19 PM
    Nginx 1.13.x
    MariaDB 5.5
  3. dorobo

    dorobo Active Member

    420
    104
    43
    Jun 6, 2014
    Ratings:
    +161
    Local Time:
    5:19 PM
    latest
    latest
    you can post here your htaccess and we'll all chip in on what's the nginx counterpart so that we can all learn from it.
     
  4. Lundz

    Lundz Member

    42
    6
    8
    May 28, 2014
    Ratings:
    +7
    Local Time:
    11:19 AM
    Well we are talking general rewrite rules.. :p

    Like these:

     
  5. RoldanLT

    RoldanLT Well-Known Member

    3,830
    929
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,258
    Local Time:
    5:19 PM
    1.11
    10.2
  6. dorobo

    dorobo Active Member

    420
    104
    43
    Jun 6, 2014
    Ratings:
    +161
    Local Time:
    5:19 PM
    latest
    latest
    that looks like a general htaccess for WordPress pretty permalinks. The nginx vhost would look like this

    Code:
    location / {
    	try_files $uri $uri/ /index.php?$args;
    }
     
  7. Lundz

    Lundz Member

    42
    6
    8
    May 28, 2014
    Ratings:
    +7
    Local Time:
    11:19 AM
    Oh, starting to learn this stuff :p
    Well, can anyone tell me what the internal does/means in configuration from the link above? :p
     
  8. RoldanLT

    RoldanLT Well-Known Member

    3,830
    929
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,258
    Local Time:
    5:19 PM
    1.11
    10.2
    Does your rewrite for XenForo?
     
  9. Lundz

    Lundz Member

    42
    6
    8
    May 28, 2014
    Ratings:
    +7
    Local Time:
    11:19 AM
    No i do not atm atleast, i'm just in a quest of getting to know nginx configurations, because switching from apache to nginx is quite different so i want to learn.. :)
     
  10. RoldanLT

    RoldanLT Well-Known Member

    3,830
    929
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,258
    Local Time:
    5:19 PM
    1.11
    10.2
  11. Dan

    Dan New Member

    14
    4
    3
    Jun 22, 2014
    Ratings:
    +5
    Local Time:
    5:19 AM
    • Like Like x 1
  12. RoldanLT

    RoldanLT Well-Known Member

    3,830
    929
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,258
    Local Time:
    5:19 PM
    1.11
    10.2
  13. Vishall

    Vishall New Member

    15
    10
    3
    Aug 3, 2014
    Ratings:
    +10
    Local Time:
    5:19 AM
    1.7
    MariaDB 10
    Please forgive me if i post this in the wrong section.

    when i try to configure friendly urls for xenforo i'm not getting to restart nginx
    Code:
    [root@mydomain ~]# service nginx restart
    nginx: [emerg] "location" directive is not allowed here in /usr/local/nginx/conf/conf.d/mydomain.com.conf:46
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
    You have new mail in /var/spool/mail/root
    
     
  14. eva2000

    eva2000 Administrator Staff Member

    29,033
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,782
    Local Time:
    7:19 PM
    Nginx 1.13.x
    MariaDB 5.5
    might want to post over in Forum software forums Forum software usage | Centmin Mod Community :)