Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-25, 19:20:42

Author Topic: rewrite rules nginx server  (Read 2927 times)

0 Members and 1 Guest are viewing this topic.

Offline kacank87

  • Valuable Member
  • *
  • Posts: 53
  • Karma: +0/-0
    • View Profile
rewrite rules nginx server
« on: 2016-03-28, 19:25:30 »
permisi mastah
mau tanya seputar rewrite rules di nginx server kloxo
saya baru migrasi dari apache ke nginx karena server sangat berat menggunakan apache
nah cms saya menggunakan .htaccess sedangkan nginx tidak membaca htacess

setelah saya convert dari apache ke nginx menjadi seperti ini
Quote
# nginx configuration
location / {
if (-e $request_filename){
rewrite ^/(.*) /$1 break;
}
rewrite "^/([a-z]+)(/([^/]{0,32})(/.+)?)?$" /index.php?a=$1&q=$3 break;
}

pertanyaannya :
1. dimanakah kode di atas di masukkan ?
2. kemudian langkah selanjutnya

Thanks mastah :)
salam

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: rewrite rules nginx server
« Reply #1 on: 2016-03-28, 21:07:30 »
di Kloxo-MR sudah ada 'default' rewrite-rule untuk nginx. Sepanjang untuk 'standard' wordpress sudah memadai.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline kacank87

  • Valuable Member
  • *
  • Posts: 53
  • Karma: +0/-0
    • View Profile
Re: rewrite rules nginx server
« Reply #2 on: 2016-03-29, 03:47:17 »
saya tidak menggunakan wordpress.
namun cms buatan sendiri mas gan.

bagaimana ya cara modifikasi nya .

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: rewrite rules nginx server
« Reply #3 on: 2016-03-29, 06:13:50 »
Copy /opt/configs/nginx/conf/globals/php-fpm_standard.conf, php-fpm_standard_ssl.conf, php-fpm_wildcards.conf, php-fpm_wildcards_ssl.conf ke custom.* (misalnya php-fpm_standard.conf ke custom.php-fpm_standard.conf). Edit file custom.* tersebut.

Setelah itu, jalankan 'sh /script/fixweb; sh /script/restart-web -y'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

 


Top 10 Social Networking:    Facebook    Twitter    LinkedIn    Pinterest    Google Plus    Tumblr    Instagram    VK    Flickr    Vine
Click Here

Page created in 0.077 seconds with 21 queries.

web stats analysis