News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

[ask] Akses localhost dari komputer lain

Started by aneurysm-, November 22, 2009, 03:21:21 PM

Previous topic - Next topic

aneurysm-

Saya abis install xampp trs masukin smf 1.1.10 + mod ajaxchat + ganti theme jadi greenlight_v1...

Udah dites dan berhasil, tapi pas mau liat dari komputer lain yang di network, kok theme nya gk kliatan?

Itu pun masuknya cuman bisa pake ip komputer yang hxxp://192.168.x.x/, sedangkan klo ketik hxxp://localhost/, tulisannya unable to connect...

Pas dibuka pake ip komputer, warna nya malah jadi putih dan acak2an posisinya, gambarnya juga gak keluar...

Mengira masalahnya di theme, akhirnya ganti lagi theme nya jadi default, tapi ternyata hasilnya sama juga...

Udah gitu, walau bisa liat index yg acak2an itu di komputer network, tapi pas klik login atau register atau help atau search atau mau masuk kategori tertentu di forum, unable to connect lagi...

FYI, komputer yg di install xampp pake ubuntu karmic koala, sedangkan komputer networknya xp, ISP speedy, dan sebelumnya ngetes phpBB bisa di akses dari komputer yang sama...

Ada yang bisa membantu?

William L

itu masalah di URL nya pak....

http://localhost/index.php
beda dengan
http://192.168.1.2/index.php

Css nya gak kenak tuw......
Coba deh view page source pasti link CSS nya jadi begini :
<link rel="stylesheet" type="text/css" href="http://localhost/Themes/default/style.css?fin11" />
Mods:
1. Spoiler BBCODE v1.1.1 [Topic  || Download]
2. Yahoo Messenger BBCODE v1.1.1 [Topic  || Download]

aneurysm-

Quote from: Enerzy on November 22, 2009, 09:52:45 PM
itu masalah di URL nya pak....

hxxp:localhost/index.php [nonactive]
beda dengan
hxxp:192.168.1.2/index.php [nonactive]

Css nya gak kenak tuw......
Coba deh view page source pasti link CSS nya jadi begini :
<link rel="stylesheet" type="text/css" href="hxxp:localhost/Themes/default/style.css?fin11 [nonactive]" />

Jadi solusinya saya harus ubah semua url yg localhost jadi ip komputer di style.css yg di themes nya ya?
Atau ada yg lain yg harus saya ubah?

eg208

Ganti "localhost" di server setting dengan no ip


bangsanegara

Quote from: eg208 on November 23, 2009, 04:17:18 AM
Ganti "localhost" di server setting dengan no ip

betul. setuju.

Lebih amannya lagi, semua link yang ada (gambar, file, css, dll) diganti ke relative path.

kalo ga ngerti apa itu relative atau absolute path :
http://webdesign.about.com/od/beginningtutorials/a/aa040502a.htm

dijamin ga ada masalah lagi.

Kalo akses localhost dari komputer lain ya emang harus pake IP pak... masalah diatas gw yakin masalah absolute path. Harusnya pke relative path biar global.
Indonesian Cofee Community | Forum Komunitas Pecinta Kopi Indonesia

William L

Mods:
1. Spoiler BBCODE v1.1.1 [Topic  || Download]
2. Yahoo Messenger BBCODE v1.1.1 [Topic  || Download]

aneurysm-

Udah dicek, semua url keknya relative path...
Dan dicoba ganti localhost ke ip di server settings, malah gk bisa dibuka, tulisannya cannot connect database, server busy bla bla bla...(ini di komputer yg di install xampp)
Ternyata eh ternyata, theme url sama theme images url yang di current theme nya yg absolute path, dan setelah diganti, selesai masalahnya...:)
Thanks all !

bangsanegara

Quote from: aneurysm- on November 24, 2009, 06:32:34 AM
Udah dicek, semua url keknya relative path...
Dan dicoba ganti localhost ke ip di server settings, malah gk bisa dibuka, tulisannya cannot connect database, server busy bla bla bla...(ini di komputer yg di install xampp)
Ternyata eh ternyata, theme url sama theme images url yang di current theme nya yg absolute path, dan setelah diganti, selesai masalahnya...:)
Thanks all !

tuh kan....  8) sip... lanjutkan....
Indonesian Cofee Community | Forum Komunitas Pecinta Kopi Indonesia

Informatics



You can catch me @ Forum Informatika a.k.a Indonesian Informatics Online Community @ http://if.web.id




Mods:
1. LinkTree v.1.1.0 [Topic  || Download]
2. Header Rotator v.1.1.0 for 1.1.x | v.2.1 for 2.0 [Topic || Download]

Advertisement: