![]() |
Installing Wordpress 2 locally on Mac OS X 10.4
Started at http://wordpress.org/support/topic/9...=3#post-493474
After reading http://maczealots.com/tutorials/wordpress/ I've managed to set up MySQL, enabled PHP, and successfully ran the installer to run locally. (Uploading images doesn't work unless the directory owner is set to 'www'. Still can't figure out why thumbnails don't work yet.) My issue is that I'm currently accessing wordpress (behind a router/NAT with port-forwarding) at http://localhost and if I attempt to view it via external IP address, the page loads as text with the template referring to "localhost". If I change the wordpress URI to the external IP, it works fine for users outside my network, however I lose complete access to the blog locally! I've read about "host files" (like local DNS) and from what I understand, I need to somehow force my traffic to my local files rather than the external IP? The NetInfoManager app only deals with resolving names to IP addresses, but not external address to local ones. I hope this makes sense. Can anyone help? |
Rerouting ip addresses is possible but needs some tricky fiddling with the firewall program ( `ipfw`. If you can understand the manual, you don't need to ask questions here :-) ). All you really need is a proper domain name. Go to http://dyndns.org and sign up for one (free, and specifically designed for people with changing ip addresses), then add a record to /etc/hosts associating your domain with the unchanging internal IP address. Tell Wordpress about it's new name, then reboot and test. Don't forget to put the results here.
p.s. do `mysqldump` in the Terminal before making config changes to Wordpress. Makes rollbacks a whole lot easier - just reload the 'before' database. |
Both local and external IP addresses are static.
I created a DynDNS account and when I visit the URL, it redirects me to my router's control panel, just as it did when I would have used the external IP address. |
Both internet and external IP address are static.
I created an account with DynDNS but the new address whatever.dyndns.com will simply direct me to the router, just as though I had typed the external IP. (I thought I submitted this reply but it seems that it didn't showing up the first time?) |
You need to probably switch the port you are running Apache on to something other than 80, and then forward that port in your router's control panel to your machine's internal IP.
|
Did you also modify /etc/hosts? (and reboot?) Of course your global IP will go to your router (and DON'T go changing Apache's port) - you need to have your name resolve to your local IP from your computer. This means /etc/hosts, local DNS or anything else the system resolver understands.
|
Quote:
The reason I suggested changing the port is that most ISPs block port 80. |
Port 80 is not blocked. I am able to access the blog from an external network. My problem comes from the fact that I can't (fully) access it locally.
I tried modifying the /etc/hosts file and rebooted but no luck. I also changed the port to 8888 instead of 80 and I get the same thing: works from external access but not local. |
Quote:
Quote:
|
Quote:
Quote:
|
Quote:
Quote:
Anyway, looks like your DNS suggestion was correct. |
Quote:
|
I've messed around with it for far too long and I'm beginning to think it's a router issue. In any case, thanks for all the support.
|
No, it's not a router issue. The router is behaving properly. WordPress wants a name, and your system has to be convinced find the proper address associated with that name. DNS is a major headache whenever it's not working. I have a very similar problem but it's on a server, so I set up a full DNS process to do the local lying for me. Once that was beaten into submission everything works fine.
|
I found this: http://www.macdevcenter.com/pub/a/ma...4/15/bind.html
The amount of information is overwhelming to say the least. |
Yep. Brew a pot of extra-strength coffee before attacking bind. However, it's overkill for you. Did you insert that NetInfo entry? All you need is something in the system resolver path that associates your site name with the local machine address before it gets to the DNS server at your provider.
BTW, the reason you keep getting the router control panel is it sees a request for it's global ip coming from the local network port, and correctly assumes the request is for it - of course no one uses the global address internally :mad: |
Quote:
|
Paste the contents of /etc/hosts here, and did you insert the NetInfo entry?
|
##
# Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost I've added: my.external.ip.here localhost (didn't work) And then tried replacing 127.0.0.1 with my external ip (also didn't work) Restarted on all attempts. |
1. Never, ever change the localhost address in hosts. put it back as it was.
Code:
##It should read something like: Code:
## |
I registered a DynDNS account.
Added it to the host file (as you showed above) Changed the Wordpress URI to the DynDNS url. All is working fine both locally and on the web! Many thanks acme.mail.order! :D |
Hi,
I have a similar problem with my wordpress install. I have port 80 forwarded to my imac hosting the site and everything seems to be working, I just need to type the dyndns url twice everytime, the first time the url changes to my local address, and then typing the dyn address again does work. Also when I first installed it it wouldn't show the images, they were aimed at my local adress so wouldn't load any of them for some reason (they showed: http://my-computer.local/ instead of my normal url linked to dyndns). And that's also what it shows now when going to the url from a external computer it also first changes the url to http://my-computer.local en when I then type it again it does work... where in the wordpress dir can I check if all the links are set to the dyndns url? or is it a permissions problem? I hope I made myself a bit clear =) tnx, dav. |
Open the wp-admin page and check that you have told WordPress the correct external URL. Then go back to the top of this thread and deal with the name resolution. It's never going to work unless WordPress has the correct name and that name points to your computer from wherever you are.
|
| All times are GMT -5. The time now is 07:30 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.