Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Can’t access index.php on LAN computer
 
revenant45
Jr. Member
 
Total Posts:  4
Joined:  2012-02-07
 

Ok. I have a magento installation on a testing server on my local LAN. Everything installed fine. I remote into the testing server from other pc’s on my LAN.. (no mouse or keyboard hooked up to it.)

ALL I want to do is access the Magento store and admin from any computer on my LAN....

I can access the entire Magento folder from another pc, including the downloader, install… everything except index.php. All it tells me is that I can’t connect when I put the url in the browser.  Is this some sort of security precaution? Do I need to modify the .htaccess file?

EXAMPLE:

//server/magento/index.php <--- easy huh? Won’t let me access it. My development PC really needs to be able to access the magento store. Can anyone help. Seems like a simple issue.

 
Magento Community Magento Community
Magento Community
Magento Community
 
revenant45
Jr. Member
 
Total Posts:  4
Joined:  2012-02-07
 

really bugging me… need help. Reinstalled Magento 4 times over already....

 
Magento Community Magento Community
Magento Community
Magento Community
 
chiefair
Mentor
 
Avatar
Total Posts:  1848
Joined:  2009-06-04
 

//server/magento/index.php

Is this actually loaded on a web server? Or just a server…

Cannot Connect just tells me that nothing’s there serving anything out on port 80

 
Magento Community Magento Community
Magento Community
Magento Community
 
reinvention18
Jr. Member
 
Total Posts:  12
Joined:  2012-01-24
 

your better off paying $3 a month for a hosting plan and doing it that way. Otherwise if your wanting to test it locally i recommend wampserver

 
Magento Community Magento Community
Magento Community
Magento Community
 
revenant45
Jr. Member
 
Total Posts:  4
Joined:  2012-02-07
 
chiefair - 06 March 2012 05:24 PM

//server/magento/index.php

Is this actually loaded on a web server? Or just a server…

Cannot Connect just tells me that nothing’s there serving anything out on port 80

Its a WAMP server using Windows 7. Windows, Apache 2.2, MySQL 5.3, PHP..... I’ve hosted many other sites and am no stranger to hosting, however this is KILLING me.

OK I’ll try to explain a bit better.
I have a WAMP server here at home.. (see above). I have Magento installed on it and pretty much nothing else. I will be using the server to develop and test Magento sites.

The Problem:
I can NOT access the Magento .index.php locally (locally meaning from other pc’s in my local LAN).  HOWEVER, I can access everything else in the Apache/htdocs.

Example:
If I type in “//server/phpmyadmin/index.php” on any of my LAN pc’s I can access MyPhp database and log in. If I type “//server/magento/downloader” I CAN connect to the Magento Connect and even log in to it. I can even run the PHPINFO test script and it works perfectly.
but if I type in “//server/magento/index.php” I get and page load error instead of the store front.

If I open up a browser on the server itself and type “127.0.0.1/magento/index.php” everything works perfectly including admin login. 

.index.php works on EVERY SINGLE folder except for Magento when I access from the LAN. This is why I’m thinking its some sort of security or access problem. All I want to do is access magento on my local server from my development PC (much stronger pc). WTF gives.

 
Magento Community Magento Community
Magento Community
Magento Community
 
chiefair
Mentor
 
Avatar
Total Posts:  1848
Joined:  2009-06-04
 

Sorry about the response, we get enough people here that wouldn’t know a web server from a box of hammers.

It’s probably because you aren’t using a fully qualified domain name to access Magento on the web server. Set up an entry in your hosts file to point the server IP address to something like server.dev and see if it will function. The cookies that Magento sets requires it to be in a domain, not a bare server name.

I run a W7 machine here with a Linux Server running under Virtual PC. Once you have the host file entry, the server becomes resolvable as a fqdn and things start working.

 
Magento Community Magento Community
Magento Community
Magento Community
 
revenant45
Jr. Member
 
Total Posts:  4
Joined:  2012-02-07
 

Thanks for all the help. =)

The problem was the base URL and the Apache servername config. Basically I removed the “www.” from the Apache config and the base URL config (secure & unsecure) and now simply type in my site address without the “www” and it now works great from any machine. I’m quickly learning that Magento is definitely not for beginners.

 
Magento Community Magento Community
Magento Community
Magento Community
 
chiefair
Mentor
 
Avatar
Total Posts:  1848
Joined:  2009-06-04
 

Ain’t that the truth.  big surprise

I highly recommend having a local server installation for exactly this reason, and if possible an OS install native or at least close to what your external server is running.

Magento is a symbiotic relationship between hardware resources, an OS, a php interpreter, a web server, a database server and the Magento application. This can often mean that no two installations are alike, but because you’ve got hands-on with setups, you’re more well equipped to make it work.

You will run into these problems on the external server and because you’ve beat your head against the wall and figured it out internally, you usually have 15 minutes of dammit instead of several days of “Oh @^$#”. Especially when dealing with Module installs and code changes.

Best to bust it where no one sees it so you shine on the live server.  wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mishmashash
Jr. Member
 
Total Posts:  3
Joined:  2012-03-15
 

Hey there,

Have been experiencing pretty much the exact same problems as revenant, am running Magento locally on a Mac via MAMP, can access everything fine from localhost:8888 etc locally, I’m then going into VirtualBox and can access the MAMP root, as well as the Magento Connect Manager via 10.0.2.2:8888 and 10.0.2.2:8888/magento/downloader/ which all makes sense so far, but like revenant also fail to access /magento/index.php.

I’m presuming this is as the base url is set in Admin to localhost:8888/magento, so there is a conflict when trying to access from a different IP. I added “10.0.2.2 localhost” to the VM’s hosts file to try and resolve this but to no avail.

I confess I’m fairly new to all this but have googled it to death and getting nowhere, so if anyone can help I’d really, really appreciate it!

******** EDIT *********

Have resolved problem by checking I could access from localhost.com:8888/magento locally, changing the base url to this in admin, then resolving localhost.com to 10.0.2.2 in the VM’s hosts file. Wheras my Mac didn’t seem to have a problem with a base URL without any dots in it (which I keep reading should be a problem), unless I found a workaround before and forgot, the Windows VIsta VM seems to need the dots, hence the above solution… all part of the fun! :-/

 
Magento Community Magento Community
Magento Community
Magento Community
 
sourav the inventer
Jr. Member
 
Avatar
Total Posts:  27
Joined:  2010-06-11
India, Westbengal, Kolkata
 

Hi all,
I have faced the same problem. But i resolve it with a simple solution.
Just go to your admin panel go to system -> configuration -> web
And change Base URL with your IP
Hope it will work.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mishmashash
Jr. Member
 
Total Posts:  3
Joined:  2012-03-15
 

Interesting! Sure somewhere the documentation said you couldn’t use an IP - not the first time they’ve said you can’t do something when you can. However the problem is that with my setup the local/host machine refers to 127.0.0.1 but the VM sees it under 10.0.2.2, so they still wouldn’t match, I don’t know if you can resolve one IP to another in the VM’s hosts file. Just another of the mysteries of Magento!

 
Magento Community Magento Community
Magento Community
Magento Community
 
bratatid
Jr. Member
 
Total Posts:  3
Joined:  2012-06-11
 
revenant45 - 01 March 2012 11:34 PM

Ok. I have a magento installation on a testing server on my local LAN. Everything installed fine. I remote into the testing server from other pc’s on my LAN.. (no mouse or keyboard hooked up to it.)

ALL I want to do is access the Magento store and admin from any computer on my LAN....


I can access the entire Magento folder from another pc, including the downloader, install… everything except index.php. All it tells me is that I can’t connect when I put the url in the browser.  Is this some sort of security precaution? Do I need to modify the .htaccess file?

EXAMPLE:

//server/magento/index.php <--- easy huh? Won’t let me access it. My development PC really needs to be able to access the magento store. Can anyone help. Seems like a simple issue.

hi,
try with this.First go your admin panel then system->configuration->web->unsecure .Here in “Base url” put your ip(like 192.168.9.45) instead of localhost.And in your secure url put same thing.Then set “Use Secure URLs in Frontend” to “yes”.After that save it and now you can access magento site (WITH URL http://192.168.9.45/magento/index.php) from anywhere in your Lan.

Thanks
bratatid

 
Magento Community Magento Community
Magento Community
Magento Community
 
patrolg
Jr. Member
 
Total Posts:  3
Joined:  2013-11-04
 

Yes in my case it was to remove the \"www.\" in the base url in the core_config_data .
Sometimes it would work and then after a while it would not and would return a 404 page for the admin page.

Seems that apache with the virual server (on centos) setup doesn\’t check name further then the www. after a while or something ..or maybe something with host files ?
I saw that i couldn\’t access another php test file into the directory.. that\’s where i suspected something with virtual server/access to the directory…

Well i am glad.. it is fixed.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top