Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > OS X > Mac OS X Server, Xserve, and Networking

Reply
 
Thread Tools Search this Thread Display Modes
Old Mar 1, 2011, 08:21 AM   #1
lynkynpark86
macrumors 6502
 
Join Date: Mar 2010
Location: Maine, USA, Earth, Solar System, Milky Way, Universe
Need help setting up apache

I'm trying to set up Apache on 10.6, and most how-to pages aren't much help. I want to set it up so anyone, anywhere (NOT HOME SHARING) can see a page I made at my IP. Also, how can I set a custom path (If someone types my IP in a browser, I want it to load /Users/admin/web/luep/index.html on my hard disk). Ideas?
__________________
White MacBook, 2.13 GHz, 2 GB RAM, 160 GB HD
Dell w/ 4GB RAM, AMD Athlon
iPod Touch 4G (or 5G :P), 32GB, iOS 5.1, awaiting jailbreak.
lynkynpark86 is offline   0 Reply With Quote
Old Mar 1, 2011, 08:51 AM   #2
iDisk
macrumors 6502a
 
iDisk's Avatar
 
Join Date: Jan 2010
Location: Menlo Park, CA
Quote:
Originally Posted by lynkynpark86 View Post
I'm trying to set up Apache on 10.6, and most how-to pages aren't much help. I want to set it up so anyone, anywhere (NOT HOME SHARING) can see a page I made at my IP. Also, how can I set a custom path (If someone types my IP in a browser, I want it to load /Users/admin/web/luep/index.html on my hard disk). Ideas?
  • Click on System Preferences
  • Click on Sharing
  • Check the box that says "Web Sharing"

Check out the attached screenshots to help you. You'll notice in screenshot #4 that apache is already built into OS X....also in screenshot #3 you'll see that once you turn on web sharing your able to click on to IP links to test your static pages.

voila
Attached Thumbnails
Click image for larger version

Name:	Untitled.png
Views:	3
Size:	13.5 KB
ID:	273767   Click image for larger version

Name:	Untitled 2.png
Views:	3
Size:	40.8 KB
ID:	273768   Click image for larger version

Name:	Untitled 3.png
Views:	3
Size:	56.0 KB
ID:	273769  

Click image for larger version

Name:	Untitled 4.png
Views:	5
Size:	386.4 KB
ID:	273770   Click image for larger version

Name:	Untitled 5.png
Views:	3
Size:	205.2 KB
ID:	273772  
__________________
"Where there is no vision the people perish:"- Proverbs 29:18

Last edited by iDisk; Mar 1, 2011 at 09:13 AM. Reason: GAVE MORE visual help
iDisk is offline   0 Reply With Quote
Old Mar 1, 2011, 09:17 AM   #3
lynkynpark86
Thread Starter
macrumors 6502
 
Join Date: Mar 2010
Location: Maine, USA, Earth, Solar System, Milky Way, Universe
But the IP's shown are my 192.168.X.XYZ IPs. Will these work somewhere other than my home network? Like another country, for example? Also, how can I change the "Sites" folder path?
__________________
White MacBook, 2.13 GHz, 2 GB RAM, 160 GB HD
Dell w/ 4GB RAM, AMD Athlon
iPod Touch 4G (or 5G :P), 32GB, iOS 5.1, awaiting jailbreak.
lynkynpark86 is offline   0 Reply With Quote
Old Mar 1, 2011, 09:31 AM   #4
iDisk
macrumors 6502a
 
iDisk's Avatar
 
Join Date: Jan 2010
Location: Menlo Park, CA
Quote:
Originally Posted by lynkynpark86 View Post
But the IP's shown are my 192.168.X.XYZ IPs. Will these work somewhere other than my home network? Like another country, for example? Also, how can I change the "Sites" folder path?
unfortunately, i'm not able to answer your question on this one..... but I can say that if you were to click on the link in the static webpage, it will bring you to the page that shows you how to set up and power apache on your Mac.
__________________
"Where there is no vision the people perish:"- Proverbs 29:18
iDisk is offline   0 Reply With Quote
Old Mar 1, 2011, 09:47 AM   #5
dampfdruck
macrumors member
 
Join Date: Oct 2008
Quote:
Originally Posted by lynkynpark86 View Post
But the IP's shown are my 192.168.X.XYZ IPs. Will these work somewhere other than my home network? Like another country, for example? Also, how can I change the "Sites" folder path?
This is a basic network configuration task. Check here: http://en.wikipedia.org/wiki/Port_forwarding

Note: By opening up your computer like this you might get yourself a security problem. The best thing would be to place it behind a reverse proxy with IDS capabilities. If you want to do this properly, you have quite a learning curve ahead.
dampfdruck is offline   0 Reply With Quote
Old Mar 1, 2011, 05:05 PM   #6
etchtech09
macrumors member
 
Join Date: Jun 2010
To change the "Sites" folder path, you will want to jump into Terminal and edit /etc/apache2/httpd.conf.

Find this:
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/Library/WebServer/Documents"

and change the last line to look like this:
#DocumentRoot "/Library/WebServer/Documents"
DocumentRoot "/Users/admin/web/luep"

Then restart Apache by running this:
sudo apachectl restart

It will ask you for your password, at this point you will be able to get to the page you want on your internal network.

You will next need to follow the advice of dampfdruck to do port forwarding on your modem/router to point to your computer that is running Apache.
etchtech09 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > OS X > Mac OS X Server, Xserve, and Networking

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Resolved: Help!!!! New mba set up problem!!! Sugi209 MacBook Air 13 Feb 9, 2011 10:21 PM
Need help setting up a wireless network. raynegus Macintosh Computers 2 Sep 26, 2004 12:49 AM
Need help setting up Gigabit/Wireless network swoolf Macintosh Computers 6 Nov 10, 2003 07:15 PM
Need help setting up dual 19inch LCDs with a switch lsutiger Macintosh Computers 4 Aug 29, 2003 02:40 PM
Need help setting up OS X for new iMac dihakz General Mac Discussion 11 Feb 7, 2002 12:32 AM


All times are GMT -5. The time now is 02:23 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC