Link to home
Start Free TrialLog in
Avatar of rickoxo
rickoxoFlag for Afghanistan

asked on

Accessing Wordpress install on local host

I run a computer lab at an elementary school and am hosting a wordpress site on a local machine running Snow Leopard Server running on a 2009 Mac Pro. The site is set up and works fine when I access it from the server, but when I connect from any other machine on the local network, I can see the unformatted content, but that's it.

I have the apache preferences set on the hosting machine for the default OS X server webhosting directory (/library/WebServer/Documents) and the wordpress site is installed in that directory. I used MAMP to install Apache, mysql and PHP, I downloaded the most recent version as of a few days ago. I'm running the latest version of wordpress (3.2.1). I've tried browsing with safari and firefox, but no luck with either. The web address I use is: http://10.72.32.66:8888/wordpress. That's the correct ip address for my local server and the :8888 is the local host port number, 8889 is the mysql port number.

Inside wordpress I'm using the generic twentyeleven theme, but I've tried a couple other installs just to see if anything different happened. Even brand new, fresh installs of wordpress show up the same way on other machines in the lab--basic content, no formatting.

If I type in that web address on any other machine in the computer lab, it brings up the title of the blog, the list of pages, the titles of the posts, but all of the content is unformatted. If I click on any of the links to the other pages, I get a message saying it can't connect to the server at localhost:8888. If I type in an address for a specific page (http://10.72.32.66:8888/wordpress/teacher) I get the content for that page, but again, no formatting. I have a linux machine in the lab as well and the same happens when I use it to browse the wordpress site.

If I just type in http://10.72.32.66/ I get an index.html file that lives in the /library/Webserver/documents directory. Default permission for those directories is set so that everyone can read. If I type in a web address http://10.72.32.66/images (a folder I created to test permissions) I can see the contents of the folder and load any pictures I put in there.

The machines in the lab are 3 year old iMacs and some brand new iMacs. Both machines get the exact same result when I try browsing the wordpress site as does a linux machine. I have a feeling it's some dumb little setting somewhere, but I'm not sure what it is. Any help would be greatly appreciated  --  Rick
Avatar of jeremyjared74
jeremyjared74
Flag of United States of America image

I've found this on the WP Forums that was resolved. It seems similar to your error. Instead of posting all the details here I'll give you the link:
http://wordpress.org/support/topic/mamp-blog-viewable-by-admin-at-httplocalhost8888-but-not-by-site-visitors
Avatar of rickoxo

ASKER

Thanks for the link. I read through what they wrote, but they never really  resolved the issue and the situation was a bit different. They were struggling with database access, whereas I can see the content of my locally hosted wordpress website from another machine on the network, but it's just missing any formatting. I tried searching all over the WP forums, but I couldn't find anything and the MAMP install directions don't even mention how to access the website from another machine.
The one thing I noticed was it seems you use a different path to your installation that what was suggested. In the forum it also suggested using localhost in the url. I don't know from experience, so it's only a guess. I'll look for other useful info and post it if I find anything helpful.
Avatar of rickoxo

ASKER

If I use localhost in the url, it tries to resolve localhost for that machine, and that machine doesn't have localhost defined, so it says it can't find the file. If I use the ip address and the port, :8888 that gets me to the correct location, I can see the content, but somehow the path information isn't working for the css file, and any other wordpress files that do the formatting. If I do http://10.72.32.66:8888/ it opens the index.html file in the root folder and displays that. So the url seems to be getting me to the right place, it's what happens after that that seems to be not working right.
SOLUTION
Avatar of jeremyjared74
jeremyjared74
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rickoxo

ASKER

I think that's what's going on as well. I have Safari on the iMacs and it lets you view source, and I just looked at it quickly but couldn't see what was wrong. I was googling around trying to figure this out and someone else mentioned the .htaccess file, so tomorrow I'll check it out and give it a try (the machine is at school and I can't access it remotely).
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rickoxo

ASKER

This info should have been part of the MAMP install directions, not everyone uses that just for local site testing ...