☺☺☺ 0 Report post Posted September 16, 2014 (edited) aku x tau camner nak create subdomain mcm ni mobile.domain.com aku dah baca bnyk tutorial kat web / google tapi masih blom berjaya. kat httpd.conf aku mcm ni NameVirtualHost *:80 <VirtualHost *:80> ServerAdmin email@domain ServerName mobile.domain.com DocumentRoot /home/www/public_html/mobile ErrorLog logs/error_log </VirtualHost> kalau aku taip www.domain.com & www.domain.com/mobile boleh takde masalah, tapi bile nak taip mobile.domain.com x kluar. help! Edited September 16, 2014 by ☺☺☺ Quote Share this post Link to post Share on other sites
ahaksz! 44 Report post Posted September 16, 2014 Ada add dekat hosts file tak?Aku buat untuk localhost so aku add line bawah ni dalam hosts file.127.0.0.1 mobile.localhost Then add code bawah ni dalam httpd.conf <VirtualHost *:80> ServerName mobile.localhost DocumentRoot "/path/to/folder" DirectoryIndex index.html </VirtualHost> So everytime bila nak ke mobile.localhost aku kena taip http://mobile.localhost. Kalau tak dia pergi Google mende tu. lol Quote Share this post Link to post Share on other sites
☺☺☺ 0 Report post Posted September 16, 2014 Ada add dekat hosts file tak? Aku buat untuk localhost so aku add line bawah ni dalam hosts file. 127.0.0.1 mobile.localhost Then add code bawah ni dalam httpd.conf <VirtualHost *:80> ServerName mobile.localhost DocumentRoot "/path/to/folder" DirectoryIndex index.html </VirtualHost> So everytime bila nak ke mobile.localhost aku kena taip http://mobile.localhost. Kalau tak dia pergi Google mende tu. lol terima kasih @ahaksz!, aku dah masukkan kat host file mcm yg ko cakap tu.. /etc/hosts tapi masih x boleh? tapi bila ping dapat plak? > ping mobile.domain.com ni bukan kat localhost.. ni kat live server.. ada idea? Quote Share this post Link to post Share on other sites
umarzuki 78 Report post Posted September 21, 2014 server apa ni? kalau ubuntu/debian ada 'quirks' sikit, nak kena symlink kat sites-enabled Quote Share this post Link to post Share on other sites
mohdfadly 24 Report post Posted September 21, 2014 DNS host kat mana? dah create CNAME record untuk subdomain? mobile.domain.com. 1800 CNAME www.domain.com Quote Share this post Link to post Share on other sites
☺☺☺ 0 Report post Posted September 22, 2014 (edited) server apa ni? kalau ubuntu/debian ada 'quirks' sikit, nak kena symlink kat sites-enabled aku guna debian bro.. ok aku dah symlink kan 2 folder ni: $ ln -s /home/www/public_html /home/www/public_html/mobile tapi masih sama.. dia tetap direct ke www.domain.com DNS host kat mana? dah create CNAME record untuk subdomain? mobile.domain.com. 1800 CNAME www.domain.com nak kena install dns ke? pelik aku sbb skang ni x pakai dns. www.domain.com jalan ok? $ service named status named is stopped tapi mcm mane bile ping subdomain ngan root dua-dua ada reply? Edited September 22, 2014 by ☺☺☺ Quote Share this post Link to post Share on other sites
umarzuki 78 Report post Posted September 23, 2014 mungkin sebab memang dah wujud domain & subdomain tu kat internet. cuba unplug network tengok.cuba semak dns client punya setting Quote Share this post Link to post Share on other sites
☺☺☺ 0 Report post Posted September 26, 2014 (edited) mungkin sebab memang dah wujud domain & subdomain tu kat internet. cuba unplug network tengok. cuba semak dns client punya setting yeeess.. akhirnya berjaya.. rupanya setting kat godaddy menjadi penyebab nya.. aku remove wildcard subdomain & catchall kat godaddy.. dlm sehari camtu subdomain aku dah berfungsi seperti yg aku mahu :3: tengkiu abang-abang @umarzuki, @mohdfadly @@ahaksz! kerana membantu.. jasa kalian akan kukenang.. blanjer sikit :159: -> http://www.youtube.com/watch?v=2OSOkm0fA-0 Edited September 26, 2014 by ☺☺☺ Quote Share this post Link to post Share on other sites