1. Halo Guest, pastikan Anda selalu menaati peraturan forum sebelum mengirimkan post atau thread baru.

[Bnr2 Disuapin] Cara Install WordPress di Unmanaged VPS (Nginx MariaDB PHP)

Discussion in 'Hosting & Domain' started by hardinalz, Sep 18, 2014.

  1. uskastore

    uskastore Superman

    Joined:
    Jun 21, 2014
    Messages:
    346
    Likes Received:
    24
    thanks gan udah ngerti kok kalau pindahan :D

    ------------------------------------


    itu ada yang beda gan, cek deh baris 25, 26, 28, 29, 32 kalau yang pake www gini:

    25 listen 80;
    26 #listen [::]:80 default_server ipv6only=on;
    27
    28 root /usr/share/nginx/html/hdpiczone.com;
    29 index index.html index.htm index.php;
    30
    31 # Make site accessible from http://localhost/
    32 server_name www.hdpiczone.com;

    sedangkan yang ga pake disuruh ubahnya gini (coba cek post agan):

    listen 80;

    root /usr/share/nginx/html/hdpiczone.com;
    index index.html index.htm index.php;

    # Make site accessible from http://hdpiczone.com/
    server_name hdpiczone.com;


    nah kode ini ga ada: #listen [::]:80 default_server ipv6only=on;
    (yang harusnya di baris 26)
    emang harus dihapus gan? jadi yang kosong baris 26 sama 27 dong


    ======================


    gan verivy yandex pas verify domain kok ga bisa ya?

    kan pertama ane udah tulis domain.com > conect. Lalu muncul perintah ini:

    Delegate your domain to Yandex

    Change your DNS servers (this procedure is performed using the tools of the domain registrar or hosting provider from which you purchased the domain):

    • Primary DNS server: dns1.yandex.net
    • Secondary DNS server: dns2.yandex.net


    Step 1. Verify domain ownership



    • We have created these detailed instructions which will help you get this done.


    • Upload a file with the name 2223b291e388.html and text 69b45127c41c to your site's root directory
    • or
    • For the subdomain yamail-2223b291e388 in your domain zone, enter the CNAME record on mail.yandex.net.
    • or
    • Specify this address [email protected] as a contact address for your domain (if your registrar does not accept this address, enter in this address instead [email protected]). This operation is handled using your registrar's tools. More about this verification method.
    Verify domain ownership
    Results of the last verification (04/03/2015 15:25)


    • File .html not found
    • and
    • CNAME record not found
    The next check will be: 04/03/2015 16:06


    Step 2. Set up MX records



    • This operation is handled using the tools of the provider that services your domain.
    • We have created these detailed instructions which will help you get this done.
    • Yandex DNS hosting
      Delegating your domain to Yandex is the easiest way to set-up Yandex.Mail on your domain
      More about DNS hosting →

    After you confirm ownership of your domain, you will need to change the MX records that go along with it.
    Enter a new MX record with the following values:

    • Subdomain name — @
    • Type of record — MX
    • Data — mx.yandex.ru.
    • Priority — 10
    You can delegate your domain to Yandex. In this event, configuring the MX records will occur automatically.



    terus tambahin di cname kan?
    ane tambahin gini di cloudflare:

    cname
    host/subdomain:yamail-2223b291e388
    alias/value:mail.yandex.net


    udah 12 jam katanya cant verify. kondisi website bisa diakses.
     
    Last edited: Mar 4, 2015
  2. hardinalz

    hardinalz Super Hero

    Joined:
    Mar 8, 2010
    Messages:
    2,395
    Likes Received:
    1,420
    Location:
    /var/www/html
    Oia ya saya yang kurang jeli. Sebenernya masalah virtual host itu hanya pengenalan aja. Jadi karakter apapun setelah tanda pagar (#) akan diabaikan termasuk tanda pagar itu sendiri. Sebenarnya inti dari isi virtual host agar web bisa dibaca nginx sangat simpel, hanya ini saja:

    server {
    listen 80;
    server_name www.example.com;
    return 301 http://example.com$request_uri;
    }

    server {
    listen 80;

    root /usr/share/nginx/html/example.com;
    index index.html index.htm index.php;

    server_name example.com;

    location / {​
    try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
    }

    location ~ /\.ht {
    deny all;
    }

    }


    Kalau agan ngga mau ribet, agan tinggal buat file virtual host dari nol dan isi dengan kode di atas, itu aja yang dibutuhin.

    Misalnya domain agan adalah example.com maka

    vi /etc/nginx/sites-available/example.com

    Copas kode di atas lalu save kalo sudah dan

    ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/

    service nginx reload


    Lanjutkan ke pembuatan folder dan upload wp conten.

    ===

    Untuk masalah yandex, cara yang paling gampang jangan buat CNAME, mending pake cara ke dua (buat file di root domain agan). Kalo dilihat dari pesen error nya, lakukan perintah ini:

    vi /usr/share/nginx/html/example.com/2223b291e388.html

    isi dengan kode: 69b45127c41c

    Save kalu sudah dan lakukan verifikasi lagi, harusnya berhasil di menit itu juga.
     
    uskastore likes this.
  3. uskastore

    uskastore Superman

    Joined:
    Jun 21, 2014
    Messages:
    346
    Likes Received:
    24
    thanks gan udah berhasil semua :D
    jadi ngerti sistem vps sekarang :)

    kalau di DO itu kan ada snapshot, itu maksudnya backup? di DO otomatis backup VPS ga gan? kalau di awal buat kan ada opsi enabled backup, ane ga ceklis sih.
     
  4. hardinalz

    hardinalz Super Hero

    Joined:
    Mar 8, 2010
    Messages:
    2,395
    Likes Received:
    1,420
    Location:
    /var/www/html
    Iya, Snapshot d DO itu buat backup. Tp sy g pake DO. Buat Backup saya pake VPS lain dari crissic.net. Dulu beli $10/thn dgn space 50GB. Lumayan terjangkau drpd DO.
     
    uskastore likes this.
  5. uskastore

    uskastore Superman

    Joined:
    Jun 21, 2014
    Messages:
    346
    Likes Received:
    24
    saya cek 15 gan paling murah, emang bagus ya? apa emang cuma buat backup aja karna kurang bagus?

    ===========

    gan saya dapet pesan error wp super cache

    Warning! WP Super Cache caching was broken but has been fixed! The script advanced-cache.php could not load wp-cache-phase1.php.

    The file /usr/share/nginx/html/domain.com/wp-content/advanced-cache.php has been recreated and WPCACHEHOME fixed in your wp-config.php. Reload to hide this message.

    Warning! Could not update /usr/share/nginx/html/domain.com/wp-config.php! WPCACHEHOME must be set in config file.

    The Maintenance Mode is active. Please don't forget to deactivate as soon as you are done.

    Error: Your cache directory (/usr/share/nginx/html/domain.com/wp-content/cache/) or /usr/share/nginx/html/domain.com/wp-content need to be writable for this plugin to work. Double-check it.Cannot continue... fix previous problems and retry.



    itu gimana benerinnya gan?
    kalau yang w3cache saya juga error, tapi untungnya dikasih tau perintah benerinnya di shell. kalau ini ga, terus blank gitu mulai dari post, page, dll.

    [HR][/HR]
    UPDATE: solved
     
    Last edited: Mar 4, 2015
  6. hardinalz

    hardinalz Super Hero

    Joined:
    Mar 8, 2010
    Messages:
    2,395
    Likes Received:
    1,420
    Location:
    /var/www/html
    Dulu saya make kupon jadinya $10 . Kayanya skrg udah ngga work. Tapi Googling aja ke LEB/LET siapa tau ada kuponnya. Crissic itu bagus gan, berdasarkan hasil penilaian forum LEB. Yang terbaru di sini _http://lowendbox.com/blog/top-provider-poll-2014-q3-the-results/ Yand dulu nya _http://lowendbox.com/blog/top-provider-poll-2014-q2-the-results/ dan _http://lowendbox.com/blog/top-provider-poll-2014-q1-the-results/.

    Untuk Cache, coba lakukan:

    chown -R www-data:www-data /usr/share/nginx/html/example.com

    lalu coba setting lagi WP Super Cache nya.
     
  7. uskastore

    uskastore Superman

    Joined:
    Jun 21, 2014
    Messages:
    346
    Likes Received:
    24
    itu bagus buat backup apa buat vps juga? kalau buat vps berarti bisa pake itu ya daripada DO?
    kalau buat full backup caranya gimana gan? dan kalau backup antar vps gitu, tinggal pointing a nya ke ip vpsnya data dan setting udah sama persis ya?

    thanks gan problem solved :D
     
  8. hardinalz

    hardinalz Super Hero

    Joined:
    Mar 8, 2010
    Messages:
    2,395
    Likes Received:
    1,420
    Location:
    /var/www/html
    Crissic VPS yang paket untuk web utama juga bagus2, rata2 review nya positif, tapi saya ngga pake karena web2 saya simpen di DS. Kalau full backup mending jangan banyak data yang ngga penting ntar (termasuk file system Linux, dll). Saran saya backup hanya database dan full web2 nya aja. Backup nya antar VPS, pernah di-share di sini:

    http://ads.id/forums/showthread.php/204753

    Saya juga nambahin jawaban di trit itu, untuk memudahkan backup antar VPS.
     
  9. uskastore

    uskastore Superman

    Joined:
    Jun 21, 2014
    Messages:
    346
    Likes Received:
    24
    gan saya ga sengaja hapus wp config, bisa direstore atau dibuat baru ga ya? tadinya mau hapus wp config sample :entahlah:
     
  10. Jyu Viole Grace

    Jyu Viole Grace Ads.id Fan

    Joined:
    Apr 2, 2014
    Messages:
    199
    Likes Received:
    72
    Location:
    Floor of Test
    gan mau tanya2. masih awam soal unmanaged vps ...
    ane pernah nemu artikel [h=1]40 Million hits a day on WordPress using a $10 VPS[/h]dia pake LEMP + PHP-FPM + microcaching di Digital Ocean
    apa bener ya bisa sampe segitunya ???
     
  11. .kingkong

    .kingkong Newbie

    Joined:
    Mar 4, 2015
    Messages:
    15
    Likes Received:
    0
    yang murah lagi apa ya vps ?
     
  12. bagusubhara

    bagusubhara Newbie

    Joined:
    Oct 4, 2014
    Messages:
    20
    Likes Received:
    0
    gila nih, perlu di bookmark dulu.... thanks gan
     
  13. Joseph Abbie

    Joseph Abbie Newbie

    Joined:
    Oct 7, 2012
    Messages:
    8
    Likes Received:
    0
    Location:
    Barberino di Mugello, Italy
    Nyimak ahh Biar ikut pinter kayak mastah-mastah disini
     
  14. bidhuan

    bidhuan Newbie

    Joined:
    Mar 5, 2015
    Messages:
    46
    Likes Received:
    0
    Salam kenal agan2.. saya newbie nih..
    makasih infonya lengkapnya..

    tapi masalah nih, dan belum tahu musti diapain,

    error code nya

    nginx: [emerg] a duplicate default server for 0.0.0.0:80 in /etc/nginx/sites-enabled/domainane.com:25
    nginx: configuration file /etc/nginx/nginx.conf test failed

    mohon petunjuk dari mastah2 disini
     
  15. hardinalz

    hardinalz Super Hero

    Joined:
    Mar 8, 2010
    Messages:
    2,395
    Likes Received:
    1,420
    Location:
    /var/www/html
    Pastikan kode di baris nomor 25 seperti gambar ini

    [​IMG]

    Lihat, di sana tidak ada default_server sebelum (atau seltelah saya lupa) angka 80.

    Coba ulang lagi.
     
  16. bidhuan

    bidhuan Newbie

    Joined:
    Mar 5, 2015
    Messages:
    46
    Likes Received:
    0
    Wah tetep nih, kebetulan saya tanpa www


    root@server1:~# service nginx restart
    [FAIL] Restarting nginx: nginx failed!
     
  17. hardinalz

    hardinalz Super Hero

    Joined:
    Mar 8, 2010
    Messages:
    2,395
    Likes Received:
    1,420
    Location:
    /var/www/html
    Berarti error nya tingal 1 ya... Untuk tanpa www coba baca http://ads.id/forums/showthread.php/192139?p=2561011#post2561011

    Setelah betul jalankan ini dulu:

    nginx -t

    Kalo masih error akan ketauan error nya di baris nomor berapa, kalo ngga ada error (success) tinggal

    service nginx reload
     
  18. bidhuan

    bidhuan Newbie

    Joined:
    Mar 5, 2015
    Messages:
    46
    Likes Received:
    0
    Errornya jadi di line 33

    nginx: [emerg] "location" directive is not allowed here in /etc/nginx/sites-enabled/domainane.com:33
    nginx: configuration file /etc/nginx/nginx.conf test failed

    apaan ya hehe
     
  19. hardinalz

    hardinalz Super Hero

    Joined:
    Mar 8, 2010
    Messages:
    2,395
    Likes Received:
    1,420
    Location:
    /var/www/html
    Tuh ketauan ada error di baris 33. Berhubung saya ngga tau baris 33 itu skrinsut nya seperti apa mending gini aja. Misal nama domainnya example.com (tanpa www) maka agan buat virtual host dari 0, jangan ikuti panduan saya di depan. Caranya:

    1. Hapus virtual host yang barusan agan buat

    rm -f /etc/nginx/sites-available/example.com

    rm -f /etc/nginx/sites-enabled/example.com

    2. Buat kembali virtual host dari nol (kosong mlompong ngga ada isi nya).

    vi /etc/nginx/sites-available/example.com

    3. Copy paste kode di bawah ke langkah nomor 2 (kalau pake vi editor, masuk mode INSERT dulu ya)

    Code:
    server {
        listen 80;
        server_name www.[COLOR=#ff0000]example.com[/COLOR];
        return 301 http://[COLOR=#ff0000]example.com[/COLOR]$request_uri;
    }
    
    server {
        listen 80;
        
        root /usr/share/nginx/html/[COLOR=#ff0000]example.com[/COLOR];
        index index.html index.htm index.php;
        
        server_name [COLOR=#ff0000]example.com[/COLOR];
        
        location / {
            try_files $uri $uri/ /index.php?$args;
        }
        
        location ~ \.php$ {
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;
        }
        
        location ~ /\.ht {
            deny all;
        }
    
    }
    
    3. Buat symbolic link

    ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/

    4. Reload virtual host

    service nginx reload

    Silahkan dilanjut ke langkah yang belum dikerjain misal di buat folder tempat situs disimpan, ato kalo pindahan, upload isi web nya, trs di-chown, dst...
     
  20. uskastore

    uskastore Superman

    Joined:
    Jun 21, 2014
    Messages:
    346
    Likes Received:
    24
    gan ini ane kan pake yandex, terus wordpress/woocomerce kok ga ngirim email ya? misal di contact form atau order baru woocommerce. Biasanya kan ada.
    harus ada yang disetting?
     

Share This Page