Welcome to Centmin Mod Community
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:
    4:15 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

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    1:15 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  3. dorobo

    dorobo Active Member

    420
    104
    43
    Jun 6, 2014
    Ratings:
    +162
    Local Time:
    11:15 AM
    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:
    4:15 AM
    Well we are talking general rewrite rules.. :p

    Like these:

     
  5. rdan

    rdan Well-Known Member

    5,446
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    11:15 AM
    Mainline
    10.2
  6. dorobo

    dorobo Active Member

    420
    104
    43
    Jun 6, 2014
    Ratings:
    +162
    Local Time:
    11:15 AM
    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:
    4:15 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. rdan

    rdan Well-Known Member

    5,446
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    11:15 AM
    Mainline
    10.2
    Does your rewrite for XenForo?
     
  9. Lundz

    Lundz Member

    42
    6
    8
    May 28, 2014
    Ratings:
    +7
    Local Time:
    4:15 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. rdan

    rdan Well-Known Member

    5,446
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    11:15 AM
    Mainline
    10.2
  11. Dan

    Dan New Member

    14
    4
    3
    Jun 22, 2014
    Ratings:
    +5
    Local Time:
    10:15 PM
  12. rdan

    rdan Well-Known Member

    5,446
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    11:15 AM
    Mainline
    10.2
  13. Vishall

    Vishall New Member

    15
    10
    3
    Aug 3, 2014
    Ratings:
    +10
    Local Time:
    11:15 PM
    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

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    1:15 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    might want to post over in Forum software forums Forum software usage | Centmin Mod Community :)
     
  15. Neon

    Neon New Member

    3
    0
    1
    Aug 5, 2020
    Ratings:
    +0
    Local Time:
    8:45 AM
    NA
    NA
    nginx rewrite


    Smarttip