Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Mork

macrumors 6502a
Original poster
Jan 9, 2009
539
34
I set up a wordpress site using MAMP on the Mac Server. All works fine - for local only access.

Yet, when I try to access the site using the actual domain name that resolves to the mac server, the URL jumps back to "localhost" and the site is thus not reachable.

I tried changing the MySQL config, but that's not the answer.

I saw a couple postings about adding a couple lines to wp-config.php, but those answers were for people trying to access the site within the same network, at least based on what I found.

Do I need to set up Apache Virtual Hosts or what exactly?

So, how do I modify my MAMP/wordpress site so I can access it from the Internet using the default port 8888?

I added that port to the Mac Server's port forwarding rules and router already.

Thanks very much in advance. :)
 

DJLC

macrumors 6502a
Jul 17, 2005
959
404
North Carolina
What's your WordPress URL as displayed in Settings -> General? That may be your culprit; DNS is resolving properly, but then WordPress rewrites the URL based on that field. I'd try updating that to yourdomain.tld:8888.
 

Mork

macrumors 6502a
Original poster
Jan 9, 2009
539
34
What's your WordPress URL as displayed in Settings -> General? That may be your culprit; DNS is resolving properly, but then WordPress rewrites the URL based on that field. I'd try updating that to yourdomain.tld:8888.

Well, that does partially work (graphics don't get displayed), but it has a huge side-effect.

Specifically, once I change the site URL in Settings->General, then the mac server's Wiki stops working immediately. Just a blank page displays. Now, at that point, it doesn't matter if I change the settings back to the way they were in WordPress. Something gets changed I can't change back.

Worse yet, if I change both site settings in Settings -> General in Wordpress (where they were both localhost), then the Mac Server's built-in website throws 500 errors from that point forward.

I tried removing WordPress and also deleting the corresponding database, and rebooting. But the mac server websites are now totally dead. 500 Errors. No idea what Wordpress/MAMP are doing behind the scenes, but it seems clear I can't use MAMP on my server like I thought I could.

Removing MAMP Pro doesn't help, either. In fact, even trying to uninstall it gives me an error.

Restoring the server (again) from a backup and then removing MAMP Pro ....

:(
 
Last edited:

DJLC

macrumors 6502a
Jul 17, 2005
959
404
North Carolina
Indeed — as mentioned in the other thread, having two web servers running on there isn't going to work. Either remove OS X Server or remove MAMP.
 

Mork

macrumors 6502a
Original poster
Jan 9, 2009
539
34
Indeed — as mentioned in the other thread, having two web servers running on there isn't going to work. Either remove OS X Server or remove MAMP.

The Apache servers are running on different ports (80 vs 8888) so I'm not sure why there is a problem.

My other app servers are also running with no problems on other ports.

Confusing.
 

belvdr

macrumors 603
Aug 15, 2005
5,945
1,372
The Apache servers are running on different ports (80 vs 8888) so I'm not sure why there is a problem.

My other app servers are also running with no problems on other ports.

Confusing.
You have a conflict somewhere in the configurations then, such as DocumentRoot or VirtualHosts. If they are on separate ports and do not point at the same directories (i.e. share nothing in common), then it would work fine.

I still don't understand the benefit of installing another web server software just for PHP. I would think the included Apache software could be used.
 

Mork

macrumors 6502a
Original poster
Jan 9, 2009
539
34
Since I do my production hosting using a web service company, I'm just not sure how to configure a Drupal Website without MAMP, locally, anyway.

If you have the steps to do that Drupal site hosting on a Mac Server, I'd love to see them.

Thanks.
 

Ridge Racer

macrumors member
Mar 16, 2007
55
169
Have a look at Docker. https://www.docker.com It allows multiple self-contained servers for running pretty much any OS and server components/software. Much more flexible than MAMP, and you can download pre-built containers with everything included to run WordPress or Drupal sites in a matter of minutes.

Have a look at http://docs.docker4drupal.org/en/latest/ for ready-made Docker containers for Drupal.

Takes a little learning, but is definitely worth it.
 

Mork

macrumors 6502a
Original poster
Jan 9, 2009
539
34
Have a look at Docker. https://www.docker.com It allows multiple self-contained servers for running pretty much any OS and server components/software. Much more flexible than MAMP, and you can download pre-built containers with everything included to run WordPress or Drupal sites in a matter of minutes.

Have a look at http://docs.docker4drupal.org/en/latest/ for ready-made Docker containers for Drupal.

Takes a little learning, but is definitely worth it.

Yes! I think this is the answer. I already use Docker for Java web services so this is a natural fit. I really do not like MAMP.

Thanks very much for this great idea!!!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.