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-28, 07:10:25

Author Topic: [ASK] nginx custom domain conf  (Read 4492 times)

0 Members and 1 Guest are viewing this topic.

Offline GentZu

  • Senior Member
  • *
  • Posts: 323
  • Karma: +0/-0
  • Gender: Male
  • yare yare...
    • View Profile
[ASK] nginx custom domain conf
« on: 2014-12-01, 04:34:39 »
saya mencoba membuat file /opt/configs/nginx/conf/domains/custom.domain.com.conf
tapi ketika di ketik command sh /script/fixweb file itu selalu hilan, apakah memenag tidak bisa?
soalnya saya ingin menerapkan nginx rewrite url pada target domain yang spesifik...

karena jikda di coba menggunakan /opt/configs/nginx/conf/globals/custom.php-fpm_wildcards.conf dan custom.php-fpm_standard.conf akan diterapkan ke semua domain, akibatnya ada yg bentrok...

masalahnya juga jika dalam file custom.php-fpm_wildcards.conf dan custom.php-fpm_standard.conf saya buatkan seperti ini juga tidak bisa

server {
    server_name  www.google.com;
    rewrite ^(.*) http://google.com$1 permanent;
}

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: [ASK] nginx custom domain conf
« Reply #1 on: 2014-12-01, 05:34:21 »
Yang dimodifikasi adalah custom dari domains.conf dan defaults.conf.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline GentZu

  • Senior Member
  • *
  • Posts: 323
  • Karma: +0/-0
  • Gender: Male
  • yare yare...
    • View Profile
Re: [ASK] nginx custom domain conf
« Reply #2 on: 2014-12-01, 05:57:50 »
Yang dimodifikasi adalah custom dari domains.conf dan defaults.conf.
wahh kalau gitu modelnya untuk menerapkan ke domain tertentu harus modelnya harus gini ya pak?
if ($host = 'domain.com') {
   rewrite ^blablabla;
}

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: [ASK] nginx custom domain conf
« Reply #3 on: 2014-12-01, 06:12:22 »
Maksud saya, anda ubah content dari /opt/configs/nginx/tpl/custom.domains.conf.tpl dan custom.defaults.conf.tpl (yang keduanya dicopy dari domains.conf.tpl dan defaults.conf.tpl).
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline GentZu

  • Senior Member
  • *
  • Posts: 323
  • Karma: +0/-0
  • Gender: Male
  • yare yare...
    • View Profile
Re: [ASK] nginx custom domain conf
« Reply #4 on: 2014-12-01, 06:40:14 »
Maksud saya, anda ubah content dari /opt/configs/nginx/tpl/custom.domains.conf.tpl dan custom.defaults.conf.tpl (yang keduanya dicopy dari domains.conf.tpl dan defaults.conf.tpl).
nah meskipun sudah buat custom tpl, di sini saya tidak mengerti cara apply rewrite url ke domain terntentu...

 


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

Page created in 0.109 seconds with 19 queries.

web stats analysis