MRatWork Forum by Mustafa Ramadhan - [warn] conflicting server name, help

Sponsor:
Server and Web Integrator
Link:
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:

MRatWork Forum | Please login or register. | 2017-11-07, 17:29:03

- MRatWork Forum by Mustafa Ramadhan »
- Language Specific Discussions »
- Indonesia Users »
- [warn] conflicting server name, help

« previous next »

- Print

Pages: [1] Go Down

### Author Topic: [warn] conflicting server name, help (Read 360 times)

0 Members and 1 Guest are viewing this topic.

#### flameblue59

- Senior Member
- Posts: 172
- Karma: +0/-0

##### [warn] conflicting server name, help

« on: 2017-03-17, 09:15:31 »
Selamat sore, saya mengalami kendala saat ingin melakukan rewrite pada nginx.conf. Berikut ini code yang saya masukan
Code: [Select]

    server {
    listen 80;
    server_name 1ori.com;
    location / {
        try_files $uri $uri.html $uri/ @extensionless-php;
        index index.html index.htm index.php;
    }

    location ~ \.php$ {
        try_files $uri =404;
    }

    location @extensionless-php {
        rewrite ^(.*)$ $1.php last;
    }
    }

saat coba restart nginx untuk apply nginx.conf malah dapet error conflicting server name.
Code: [Select]

    Stopping nginx:                                            [  OK  ]
    Starting nginx: nginx: [warn] conflicting server name "1ori.com" on 0.0.0.0:80, ignored
                                                               [  OK  ]

Mohon bantuannya pak MR. Thank you
Logged

#### MRatWork

- Administrator
- The Elite
- Posts: 15,381
- Karma: +112/-9
- Gender:

##### Re: [warn] conflicting server name, help

« Reply #1 on: 2017-03-17, 09:36:45 »
Itu karena domain tersebut sudah di-declare pada directory /opt/nginx/conf/domains (terkait 'server_name 1ori.com;')
Logged
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

#### flameblue59

- Senior Member
- Posts: 172
- Karma: +0/-0

##### Re: [warn] conflicting server name, help

« Reply #2 on: 2017-03-17, 10:37:44 »
saya coba cari opt/nginx tidak ada pak MR. Bagaimana cara aksesnya ya?
Logged

#### MRatWork

- Administrator
- The Elite
- Posts: 15,381
- Karma: +112/-9
- Gender:

##### Re: [warn] conflicting server name, help

« Reply #3 on: 2017-03-17, 15:26:25 »
Maaf, seharusnya di /opt/configs/nginx/conf/domains.
Logged
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

#### flameblue59

- Senior Member
- Posts: 172
- Karma: +0/-0

##### Re: [warn] conflicting server name, help

« Reply #4 on: 2017-03-17, 16:08:23 »
saya sudah coba set script ini
Code: [Select]

    location / {
        try_files $uri $uri.html $uri/ @extensionless-php;
        index index.html index.htm index.php;
    }

    location ~ \.php$ {
        try_files $uri =404;
    }

    location @extensionless-php {
        rewrite ^(.*)$ $1.php last;
    }

sayangnya masih tetep ga bisa pak MR, padahal saya sudah taruh pada lokasi yang benar. Berikut ini errornya
Code: [Select]

    [root@server domains]# service nginx restart
    nginx: [emerg] duplicate location "/" in /opt/configs/nginx/conf/globals/switch_standard.conf:57
    nginx: configuration file /etc/nginx/nginx.conf test failed

bagaimana solusinya ya? Karena duplicate location "/". Padahal saya mau remove php extension yang ada di file2 saya. Thank you
Logged

#### MRatWork

- Administrator
- The Elite
- Posts: 15,381
- Karma: +112/-9
- Gender:

##### Re: [warn] conflicting server name, help

« Reply #5 on: 2017-03-17, 17:22:26 »
Sebenarnya yang anda maui/inginkan apa?.
Logged
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

#### flameblue59

- Senior Member
- Posts: 172
- Karma: +0/-0

##### Re: [warn] conflicting server name, help

« Reply #6 on: 2017-03-17, 17:27:12 »
saya mau menghilangkan .php extension pak MR. Jadi misalnya
domain.com/files.php
bisa diakses dengan
domain.com/files
kurang lebih sama seperti .htaccess, sayangnya htaccess tidak bisa jalan di nginx. Jadi terpaksa dari htaccess harus convert ke nginx.conf supaya bisa jalan.
Logged

#### MRatWork

- Administrator
- The Elite
- Posts: 15,381
- Karma: +112/-9
- Gender:

##### Re: [warn] conflicting server name, help

« Reply #7 on: 2017-03-17, 17:58:30 »
1. Jalankan 'sh /script/fixweb'
2. Copy file '/opt/configs/nginx/conf/domains/domainanda.com.conf' ke '/opt/configs/nginx/conf/customs/domainanda.com.conf'
3. Ubah isi '/opt/configs/nginx/conf/customs/domainanda.com.conf' dari 'switch_standard.conf' dan 'switch_standard_ssl.conf' ke 'custom.switch_standard.conf' dan 'custom.switch_standard_ssl.conf'
4. Copy 'switch_standard.conf' dan 'switch_standard_ssl.conf' ke 'custom.switch_standard.conf' ke 'custom.switch_standard.conf' dan 'custom.switch_standard_ssl.conf' pada '/opt/configs/nginx/conf/globals'
5. Jalankan 'sh /script/restart-web'
Logged
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

- Print

Pages: [1] Go Up
« previous next »

- MRatWork Forum by Mustafa Ramadhan »
- Language Specific Discussions »
- Indonesia Users »
- [warn] conflicting server name, help

Top 4 Global Search Engines: Google Bing Baidu Yahoo

- Design By SMFSimple.com
- SMF 2.0.14 | SMF © 2017, Simple Machines

Page created in 0.047 seconds with 17 queries.

Mirror created by MasterkinG32.CoM