Alias HTTP pada MapServer MS4W memungkinkan Anda mengakses project web GIS dengan URL yang lebih pendek dan mudah diingat. Tutorial ini membahas cara membuat dan mengkonfigurasi alias pada server MS4W.
Alias HTTP adalah mapping antara URL pendek dengan lokasi sebenarnya di server. Misalnya, alih-alih mengakses http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/myproject/mapfile.map, Anda bisa membuat alias sehingga cukup mengakses http://localhost/myproject/.
MS4W (MapServer for Windows) adalah paket installer yang berisi MapServer dan komponen pendukungnya untuk platform Windows. MS4W sudah include Apache web server, PHP, dan berbagai library GIS.
File konfigurasi Apache di MS4W berada di C:/ms4w/Apache/conf/httpd.conf. Buka file ini dengan text editor (Notepad++ atau VS Code).
Tambahkan konfigurasi berikut di httpd.conf:
# Alias untuk project GIS
Alias /myproject "C:/ms4w/apps/myproject"
<Directory "C:/ms4w/apps/myproject">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Untuk menjalankan MapServer CGI, tambahkan ScriptAlias:
# ScriptAlias untuk MapServer CGI
ScriptAlias /cgi-bin/ "C:/ms4w/Apache/cgi-bin/"
# Alias untuk mapserv di project tertentu
Alias /myproject/cgi-bin "C:/ms4w/Apache/cgi-bin"
<Directory "C:/ms4w/Apache/cgi-bin">
Options ExecCGI
Require all granted
</Directory>
Buat file .map di direktori project Anda. Pastikan path di mapfile menggunakan format MS4W:
MAP
NAME "myproject"
STATUS ON
SIZE 800 600
WEB
IMAGEPATH "C:/ms4w/apps/myproject/tmp/"
IMAGEURL "/myproject/tmp/"
END
LAYER
NAME "base"
TYPE POLYGON
STATUS ON
DATA "shapefile/nama_shapefile"
END
END
Restart Apache MS4W agar konfigurasi baru diterapkan:
# Via Command Prompt (Run as Administrator)
cd C:/ms4w
Apacheinhttpd.exe -k restart
# Atau restart layanan Apache jika sudah diinstall sebagai service
net stop ApacheMS4W
net start ApacheMS4W
Buka browser dan akses alias yang sudah dibuat:
Membuat alias HTTP pada MS4W mempermudah akses project web GIS dan membuat URL lebih profesional. Dengan konfigurasi yang benar, project GIS Anda bisa diakses dengan URL yang singkat dan mudah diingat.
paper writer services13 Feb 2021
Howdy would you mind letting me know which webhhost you're working with? I've loaded your blog in 3 different browsers aand I must sayy this blog loads a loot quicker then most. Can you suggest a good hosting provider at a honest price? Thanks, I appreciate it! https://750-word-essa8212.hpage.com/purchase-research-papers-online.html paper writer services paper writer services https://works.bepress.com/arthistoryiresearchpapertopics/14/
Reply