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, 12:42:27

Author Topic: Nginx / Nginx-Proxy error file conf  (Read 8709 times)

0 Members and 1 Guest are viewing this topic.

Offline noob

  • Valuable Member
  • *
  • Posts: 98
  • Karma: +0/-0
  • Gender: Male
    • View Profile
    • KombatHost
Nginx / Nginx-Proxy error file conf
« on: 2016-08-12, 12:05:29 »
Halo Pak MR.

Barusan semalam saya install Kloxo-MR di VPS baru, ternyata saat saya install dan pilih nginx-proxy, error dengan pesan:
Code: [Select]
nginx: [emerg] "server" directive is not allowed here in /opt/configs/nginx/conf/domains/serv22.kombathost.com.conf:77
nginx: configuration file /etc/nginx/nginx.conf test failed

ternyata di file /opt/configs/nginx/conf/domains/serv22.kombathost.com.conf di line 77 scriptnya kurang tanda kurung kurawal (}).

berikut default yang diberikan kloxo-MR:
Code: [Select]
### begin - web of 'serv22.kombathost.com' - do not remove/modify this line


## cp for 'serv22.kombathost.com'
server {
        #disable_symlinks if_not_owner;

        include '/opt/configs/nginx/conf/globals/listen_nonssl.conf';

        include '/opt/configs/nginx/conf/globals/gzip.conf';

        include '/opt/configs/nginx/conf/globals/header_base.conf';

        server_name cp.serv22.kombathost.com;

        include '/opt/configs/nginx/conf/globals/acme-challenge.conf';

        index index.php index.shtml index.pl index.py index.cgi index.rb Default.aspx Default.asp index.html index.htm default.htm welcome.html;

        set $var_domain 'cp.serv22.kombathost.com';
        set $var_rootdir '/home/kloxo/httpd/cp';

        root $var_rootdir;

        set $var_user 'apache';
        set $var_fpmport '50000';
        set $var_phpselected 'php';

        fastcgi_connect_timeout 300s;
        fastcgi_send_timeout 300s;
        fastcgi_read_timeout 300s;

        proxy_connect_timeout 300s;
        proxy_send_timeout 300s;
        proxy_read_timeout 300s;

        include '/opt/configs/nginx/conf/globals/switch_standard.conf';
}


## webmail for 'serv22.kombathost.com'
server {
        #disable_symlinks if_not_owner;

        include '/opt/configs/nginx/conf/globals/listen_nonssl.conf';

        include '/opt/configs/nginx/conf/globals/gzip.conf';

        include '/opt/configs/nginx/conf/globals/header_base.conf';

        server_name webmail.serv22.kombathost.com;

        include '/opt/configs/nginx/conf/globals/acme-challenge.conf';

        index index.php index.shtml index.pl index.py index.cgi index.rb Default.aspx Default.asp index.html index.htm default.htm welcome.html;

        set $var_domain 'webmail.serv22.kombathost.com';
        set $var_rootdir '/home/kloxo/httpd/webmail';

        root $var_rootdir;

        set $var_user 'apache';
        set $var_fpmport '50000';
        set $var_phpselected 'php';

        fastcgi_connect_timeout 300s;
        fastcgi_send_timeout 300s;
        fastcgi_read_timeout 300s;

        proxy_connect_timeout 300s;
        proxy_send_timeout 300s;
        proxy_read_timeout 300s;

        include '/opt/configs/nginx/conf/globals/switch_standard.conf';

## cp for 'serv22.kombathost.com'
server {
        #disable_symlinks if_not_owner;

        include '/opt/configs/nginx/conf/globals/listen_ssl.conf';

        include '/opt/configs/nginx/conf/globals/gzip.conf';

        include '/opt/configs/nginx/conf/globals/header_base.conf';

        server_name cp.serv22.kombathost.com;

        include '/opt/configs/nginx/conf/globals/acme-challenge.conf';

        index index.php index.shtml index.pl index.py index.cgi index.rb Default.aspx Default.asp index.html index.htm default.htm welcome.html;

        set $var_domain 'cp.serv22.kombathost.com';
        set $var_rootdir '/home/kloxo/httpd/cp';

        root $var_rootdir;

        set $var_user 'apache';
        set $var_fpmport '50000';
        set $var_phpselected 'php';

        fastcgi_connect_timeout 300s;
        fastcgi_send_timeout 300s;
        fastcgi_read_timeout 300s;

        proxy_connect_timeout 300s;
        proxy_send_timeout 300s;
        proxy_read_timeout 300s;

        include '/opt/configs/nginx/conf/globals/switch_standard.conf';
}
#kode selanjutnya.....

harusnya, persis di atas kode: `## cp for 'serv22.kombathost.com'` ditutup dulu pakai kurung kurawal seperti ini:
Code: [Select]
### begin - web of 'serv22.kombathost.com' - do not remove/modify this line


## cp for 'serv22.kombathost.com'
server {
        #disable_symlinks if_not_owner;

        include '/opt/configs/nginx/conf/globals/listen_nonssl.conf';

        include '/opt/configs/nginx/conf/globals/gzip.conf';

        include '/opt/configs/nginx/conf/globals/header_base.conf';

        server_name cp.serv22.kombathost.com;

        include '/opt/configs/nginx/conf/globals/acme-challenge.conf';

        index index.php index.shtml index.pl index.py index.cgi index.rb Default.aspx Default.asp index.html index.htm default.htm welcome.html;

        set $var_domain 'cp.serv22.kombathost.com';
        set $var_rootdir '/home/kloxo/httpd/cp';

        root $var_rootdir;

        set $var_user 'apache';
        set $var_fpmport '50000';
        set $var_phpselected 'php';

        fastcgi_connect_timeout 300s;
        fastcgi_send_timeout 300s;
        fastcgi_read_timeout 300s;

        proxy_connect_timeout 300s;
        proxy_send_timeout 300s;
        proxy_read_timeout 300s;

        include '/opt/configs/nginx/conf/globals/switch_standard.conf';
}


## webmail for 'serv22.kombathost.com'
server {
        #disable_symlinks if_not_owner;

        include '/opt/configs/nginx/conf/globals/listen_nonssl.conf';

        include '/opt/configs/nginx/conf/globals/gzip.conf';

        include '/opt/configs/nginx/conf/globals/header_base.conf';

        server_name webmail.serv22.kombathost.com;

        include '/opt/configs/nginx/conf/globals/acme-challenge.conf';

        index index.php index.shtml index.pl index.py index.cgi index.rb Default.aspx Default.asp index.html index.htm default.htm welcome.html;

        set $var_domain 'webmail.serv22.kombathost.com';
        set $var_rootdir '/home/kloxo/httpd/webmail';

        root $var_rootdir;

        set $var_user 'apache';
        set $var_fpmport '50000';
        set $var_phpselected 'php';

        fastcgi_connect_timeout 300s;
        fastcgi_send_timeout 300s;
        fastcgi_read_timeout 300s;

        proxy_connect_timeout 300s;
        proxy_send_timeout 300s;
        proxy_read_timeout 300s;

        include '/opt/configs/nginx/conf/globals/switch_standard.conf';
}
##tambahkan kurung kurawal di atas ini
## cp for 'serv22.kombathost.com'
server {
        #disable_symlinks if_not_owner;

        include '/opt/configs/nginx/conf/globals/listen_ssl.conf';

        include '/opt/configs/nginx/conf/globals/gzip.conf';

        include '/opt/configs/nginx/conf/globals/header_base.conf';

        server_name cp.serv22.kombathost.com;

        include '/opt/configs/nginx/conf/globals/acme-challenge.conf';

        index index.php index.shtml index.pl index.py index.cgi index.rb Default.aspx Default.asp index.html index.htm default.htm welcome.html;

        set $var_domain 'cp.serv22.kombathost.com';
        set $var_rootdir '/home/kloxo/httpd/cp';

        root $var_rootdir;

        set $var_user 'apache';
        set $var_fpmport '50000';
        set $var_phpselected 'php';

        fastcgi_connect_timeout 300s;
        fastcgi_send_timeout 300s;
        fastcgi_read_timeout 300s;

        proxy_connect_timeout 300s;
        proxy_send_timeout 300s;
        proxy_read_timeout 300s;

        include '/opt/configs/nginx/conf/globals/switch_standard.conf';
}
#kode selanjutnya.....

tolong diupdate Pak, biar untuk fix tinggal update kloxo-MR saja.

thanks
http://kombathost.com | Your ultimate webhosting

Offline noob

  • Valuable Member
  • *
  • Posts: 98
  • Karma: +0/-0
  • Gender: Male
    • View Profile
    • KombatHost
Re: Nginx / Nginx-Proxy error file conf
« Reply #1 on: 2016-08-12, 12:17:48 »
kalo saya cek sih ternyata cp dan webmail confignya 2x ada di file conf tsb, mungkin harusnya cuma 1 ya pak
http://kombathost.com | Your ultimate webhosting

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Nginx / Nginx-Proxy error file conf
« Reply #2 on: 2016-08-12, 12:49:31 »
Ada 2 karena 1 untuk non-ssl (http) dan satunya untuk ssl (https).
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline jamalrahmat

  • Valuable Member
  • *
  • Posts: 64
  • Karma: +0/-0
    • View Profile
Re: Nginx / Nginx-Proxy error file conf
« Reply #3 on: 2016-08-13, 06:48:56 »
Wah pas banget ada tritnya...

Barusan update versi Kloxo-MR 7.0.0.b-2016081102, ternyata juga dapat notif seperti itu.

Terima kasih banyak informasinya :)

Edit:

Quote
~ Pengontrolnya dimana path mana ya? Kalau edit tiap domain pegel juga yang banyak domainnya.
~ Udah di edit jangan di fix segala. Kembali lagi soalnya.
« Last Edit: 2016-08-13, 07:13:44 by jamalrahmat »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Nginx / Nginx-Proxy error file conf
« Reply #4 on: 2016-08-13, 07:39:01 »
Bukan saja 'cp' dan 'webmail', parked dan redirected domain juga di-declare di file conf yang sama.

Ada tujuan mengapa demikian. Misalnya, bukan saja domain.com dan www.domain.com pakai ssl yang sama tapi cp.domain.com dan webmail.domain.com juga pakai ssl yang sama. Bahkan parked dan redirected domain juga.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline masnggakdiajak

  • Valuable Member
  • *
  • Posts: 126
  • Karma: +0/-0
    • View Profile
Re: Nginx / Nginx-Proxy error file conf
« Reply #5 on: 2016-08-13, 12:21:28 »
di line 75 kurang ( "}" )

berhasil, nginx dapat di restart, tapi setelah jalankan
Code: [Select]
sh /script/fixssl; sh /script/fixweb; sh /script/restart-web -y

balik lagi errornya,  di server banyak domain, gimana cara nangani nya pak? pegel edit satu2   :D

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Nginx / Nginx-Proxy error file conf
« Reply #6 on: 2016-08-13, 12:58:48 »
Silahkan update Kloxo-MR 7.0.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline masnggakdiajak

  • Valuable Member
  • *
  • Posts: 126
  • Karma: +0/-0
    • View Profile
Re: Nginx / Nginx-Proxy error file conf
« Reply #7 on: 2016-08-13, 13:23:54 »
yes normal kembali  :),

makasih pak,  ;)

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Nginx / Nginx-Proxy error file conf
« Reply #8 on: 2016-08-13, 13:27:42 »
Ini karena ada error di pc saya sehingga ketika upload ada file yang isinya tidak utuh.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline masnggakdiajak

  • Valuable Member
  • *
  • Posts: 126
  • Karma: +0/-0
    • View Profile
Re: Nginx / Nginx-Proxy error file conf
« Reply #9 on: 2016-08-13, 13:39:27 »
ooo begitu, oke pak sekarang sudah normal,

makasih pak,  ;)

Offline masnggakdiajak

  • Valuable Member
  • *
  • Posts: 126
  • Karma: +0/-0
    • View Profile
Re: Nginx / Nginx-Proxy error file conf
« Reply #10 on: 2016-08-13, 13:43:30 »
tapi, ssl dari letsencrypt ndak mau jalan ya pak?

padahal sudah jalanin
sh /script/fixssl; sh /script/fixweb; sh /script/restart-web -y
sh /script/fix-all
sh /script/restart-all -y

ketika di buka di browser sslnya error

egov.co.id uses an invalid security certificate. The certificate is not trusted because it is self-signed. The certificate is only valid for Kloxo-MR Error code: SEC_ERROR_UNKNOWN_ISSUER

itu kenapa ya pak?

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Nginx / Nginx-Proxy error file conf
« Reply #11 on: 2016-08-13, 14:02:54 »
Tidak ada masalah saya lihat di tempat saya.

Coba lihat di /opt/configs/nginx/conf/domains/domainanda.com.conf apakah terlihat 'ssl_certificate /home/kloxo/ssl/domainanda.com.pem;'?.

Jika tidak, coba lakukan 'sh /script/fixssl'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline masnggakdiajak

  • Valuable Member
  • *
  • Posts: 126
  • Karma: +0/-0
    • View Profile
Re: Nginx / Nginx-Proxy error file conf
« Reply #12 on: 2016-08-13, 14:11:50 »
ssl_certificate /home/kloxo/ssl/domainanda.com.pem; tidak ada pak,

setelah saya jalankan 'sh /script/fixssl'

saya coba lihat lagi ssl_certificate /home/kloxo/ssl/domainanda.com.pem; di /opt/configs/nginx/conf/domains/domainanda.com.conf tidak ada pak,


Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Nginx / Nginx-Proxy error file conf
« Reply #13 on: 2016-08-13, 14:16:04 »
Yakin ssl untuk domain tersebut ada di daftar ssl?.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Nginx / Nginx-Proxy error file conf
« Reply #14 on: 2016-08-13, 14:17:17 »
Di /home/kloxo/ssl apa ada ssl dari domain tersebut?.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

 


Top 4 Global Search Engines:    Google    Bing    Baidu    Yahoo
Click Here

Page created in 0.033 seconds with 21 queries.

web stats analysis