|
|
Running an Apache server when port 80 is blocked
|
|
|
|
Fresh-Faced Recruit
Join Date: Jan 2004
Status:
Offline
|
|
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.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status:
Offline
|
|
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"
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Feb 2000
Location: Washington, DC
Status:
Offline
|
|
so is apache running as root... I guess it must to be running on 80...
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
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 Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|