Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > Running an Apache server when port 80 is blocked

Running an Apache server when port 80 is blocked
Thread Tools
dhamon
Fresh-Faced Recruit
Join Date: Jan 2004
Status: Offline
Reply With Quote
Jun 6, 2004, 02:44 AM
 
I had apache set up all nicely, but then I discovered that my ISP is blocking port 80, meaning that no one else can access the files I'm trying to host. I know there is a way to make apache use a different port, but I'm not at all sure what that entails. If soemone could point me to a helpful tutorial, I would be very grateful.
     
[APi]TheMan
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status: Offline
Reply With Quote
Jun 6, 2004, 05:00 AM
 
Originally posted by dhamon:
I had apache set up all nicely, but then I discovered that my ISP is blocking port 80, meaning that no one else can access the files I'm trying to host. I know there is a way to make apache use a different port, but I'm not at all sure what that entails. If soemone could point me to a helpful tutorial, I would be very grateful.
Yup, that option resides in Apache's config file, /etc/httpd/httpd.conf. Edit it with vim or pico in the Terminal(!) and go down to line 316:
Code:
313 # Port: The port to which the standalone server listens. For 314 # ports < 1023, you will need httpd to be run as root initially. 315 # 316 Port 80
Change that to the port you need, save the file, and then restart Apache to make it use the new config:
Code:
[aorth@nacho: ~]$ sudo apachectl graceful Password: /usr/sbin/apachectl graceful: httpd gracefully restarted
If you need help getting into and moving around the config file with pico or vim, then let me know and I'll post a better instruction set. Good luck.

"In Nomine Patris, Et Fili, Et Spiritus Sancti"

     
mitchell_pgh
Posting Junkie
Join Date: Feb 2000
Location: Washington, DC
Status: Offline
Reply With Quote
Jun 6, 2004, 07:58 AM
 
so is apache running as root... I guess it must to be running on 80...
     
Angus_D
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Jun 6, 2004, 09:48 AM
 
Originally posted by mitchell_pgh:
so is apache running as root... I guess it must to be running on 80...
There is one process that runs as root so it can bind to 80 but all the child processes that actually do any work run as www for security reasons. Observe:
Code:
spiffy:~ finlayd$ ps -caux | grep httpd root 298 0.0 0.0 28456 200 ?? Ss Fri04PM 0:04.86 httpd www 304 0.0 0.0 28456 60 ?? S Fri04PM 0:00.00 httpd
     
   
 
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -4. The time now is 02:11 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,