[ASK] Cara pasang google sitemap plugin di server nginx

Discussion in 'Desain Web dan Programming' started by Andikoli, 25 Mar 2015.

Thread Status:
Not open for further replies.
  1. Andikoli

    Andikoli Beginner 2.0

    Messages:
    43
    Likes Received:
    1
    Trophy Points:
    8
    halo para member DWH, saya ada masalah nih sama plugin google xml. mohon dibantu yang udah pernah pasang google xml plugin di web server nginx
     
  2. Andikoli

    Andikoli Beginner 2.0

    Messages:
    43
    Likes Received:
    1
    Trophy Points:
    8
    dimana yah buat naro kode rewritenya

    rewrite ^/sitemapindex\.xml$ /index.php?sitemap=1 last;
    rewrite ^/([^/]+?)_part([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
    rewrite ^/([^/]+?)\.xml$ /index.php?sitemap=$1 last;
     
  3. mustafaramadhan

    mustafaramadhan Hosting Guru

    Messages:
    3,237
    Likes Received:
    857
    Trophy Points:
    113
    Langsung di 'server {}' atau 'location {}' sesuai peruntukan.
     
  4. Andikoli

    Andikoli Beginner 2.0

    Messages:
    43
    Likes Received:
    1
    Trophy Points:
    8
    masih belum ngerti Tuan, saya udah coba nempatin cuma masih bingun dimana

    /etc/nginx/nginx.conf

    atau

    /etc/nginx/sites-available/contoh-folder
     
  5. Andikoli

    Andikoli Beginner 2.0

    Messages:
    43
    Likes Received:
    1
    Trophy Points:
    8
    server {
    location / {
    rewrite ^/sitemapindex\.xml$ /index.php?sitemap=1 last;
    rewrite ^/([^/]+?)_part([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
    rewrite ^/([^/]+?)\.xml$ /index.php?sitemap=$1 last;
    }

    untuk sintaxnya begitu bukan Tuan
     
  6. mustafaramadhan

    mustafaramadhan Hosting Guru

    Messages:
    3,237
    Likes Received:
    857
    Trophy Points:
    113
    Mestinya begitu. Tapi di dalam 'server {}' ada ketentuan lain semisal 'server_name' dan lain-lain.

    Dibanding pusing-pusing, pakai saja CP free yang sudah mendukung nginx/nginx-proxy semisal Kloxo-MR.
     
  7. Andikoli

    Andikoli Beginner 2.0

    Messages:
    43
    Likes Received:
    1
    Trophy Points:
    8
    kebetulan udah dicoba Tuan, masih error sitemapnya. udah terlanjur engk pakai CP Tuan. ada cara lain engk yah biar bisa..?
     
  8. Andikoli

    Andikoli Beginner 2.0

    Messages:
    43
    Likes Received:
    1
    Trophy Points:
    8
    cuma nempatin ini ajah, masih belum bisa


    rewrite ^/sitemapindex\.xml$ /index.php?sitemap=1 last;
    rewrite ^/([^/]+?)_part([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
    rewrite ^/([^/]+?)\.xml$ /index.php?sitemap=$1 last;
     
  9. idnix

    idnix Hosting Guru

    Messages:
    1,003
    Likes Received:
    189
    Trophy Points:
    63
    taro di bagian bawah vhost kamu sebelum end tag }
     
  10. Andikoli

    Andikoli Beginner 2.0

    Messages:
    43
    Likes Received:
    1
    Trophy Points:
    8
    Resolve, masalah selesai pakai plugin sitemap
     
Loading...
Thread Status:
Not open for further replies.

Share This Page

Loading...