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 > macOS > Changing Personal Web Sharing Port

Changing Personal Web Sharing Port
Thread Tools
jugglenutfer
Fresh-Faced Recruit
Join Date: May 2003
Status: Offline
Reply With Quote
May 12, 2003, 01:59 AM
 
Hello,

I have been trying to do this for weeks and can't find any information doing web searches. I have spend countless hours particularly in Google, and it's been worthless. Now my last resort is forums, and I hope anyone can help. Here is my situation:

As you might know, awhile back Cable companies such as AT&T and Cox Communications decided to block port 80 for Web Sharing. This was bad, because I was not able to share a small website in cyberspace because of what they did. In Mac OS 9, it was simple to solve. I would simply go into the preferences and change the port from 80 to 8888, then I would give my IP with the port (eg http://30.20.203:8888/website) and it would work just perfect. Well, the Mac OS 9 era is over, Mac OS X came in awhile go. I have asked many people and no one knows. How can I change the port so people can view my Personal Web Sharing sites? Simply, how can I change the port from 80 to 8888? Any help would be GREATLY APPRECIATED, thanks!
     
Stratus Fear
Senior User
Join Date: Dec 2002
Location: Atlanta, GA
Status: Offline
Reply With Quote
May 12, 2003, 02:02 AM
 
You'll need to change the port that Apache listens on in your /etc/httpd/httpd.conf file.

Edit: To be a little more specific, open a terminal, type "sudo emacs /etc/httpd/httpd.conf" and enter your password when prompted. When emacs opens, scroll down until you find a line that looks like this:

Port 80

It'll look something like that. Change the number to whatever port you want the server to listen on, save the file, and restart Mac OS X. That should do it.

Try to avoid anything below 1000 or so, though. Some of those are standard ports, and some of the others are used by certain companies.
     
JB72
Mac Elite
Join Date: Jan 2001
Location: L.A., CA
Status: Offline
Reply With Quote
May 12, 2003, 02:10 AM
 
I think Cocktail will do that for you via GUI too.

     
jugglenutfer  (op)
Fresh-Faced Recruit
Join Date: May 2003
Status: Offline
Reply With Quote
May 12, 2003, 02:10 AM
 
Thanks! But how do I save the file, please help.
     
Stratus Fear
Senior User
Join Date: Dec 2002
Location: Atlanta, GA
Status: Offline
Reply With Quote
May 12, 2003, 02:12 AM
 
Originally posted by jugglenutfer:
Thanks! But how do I save the file, please help.
Oops...I forgot about that part, I'm sorry. Emacs is a good editor for the terminal, but the keystrokes are a pain. IIRC, to quit and save it's either Ctrl-c Ctrl-x or Ctrl-x Ctrl-c. I've been using a gui version of emacs for a while now so I don't remember too well.
     
jugglenutfer  (op)
Fresh-Faced Recruit
Join Date: May 2003
Status: Offline
Reply With Quote
May 12, 2003, 02:12 AM
 
Holy crap right on my face, and I've been using Cocktail all along and never saw that. Thanks guys, your help is really appreciated.
     
Gul Banana
Mac Elite
Join Date: May 2002
Status: Offline
Reply With Quote
May 12, 2003, 09:03 AM
 
You know, telling command-line novices to use emacs is just plain mean.
[vash:~] banana% killall killall
Terminated
     
quadgrande
Dedicated MacNNer
Join Date: Sep 2000
Location: New York, NY
Status: Offline
Reply With Quote
May 12, 2003, 09:14 AM
 
Pico is a bit easier to use. The commands for operating are at the bottom of the window while you're editing. ^O for example will save or "WriteOut" your file ( ^ = control ).

Open a terminal window and type:

sudo pico /etc/httpd/httpd.conf

Enter your password and prompted and look for a line with only "Port 80" on it. Make sure your don't set the port to one already taken by another process. You can use the network utility in your "Utilities" folder to portscan "localhost" to see what ports are currently open.

When you're through, save the file, and restart your webserver through System Preferences (just stop and start it). Now visit your new page with:

http://localhostort#
     
Stratus Fear
Senior User
Join Date: Dec 2002
Location: Atlanta, GA
Status: Offline
Reply With Quote
May 12, 2003, 11:51 AM
 
Originally posted by Gul Banana:
You know, telling command-line novices to use emacs is just plain mean.
I know, but there were two problems:

1) I forgot about Pico I'm not sure how I did that.
2) Logging in as root to use TextEdit to edit the thing might have been more of a pain.

Unfortunately at the time I was in Linux and I couldn't think of anything easier than emacs. Guess I've been in Linux too long
     
SpinCycle
Forum Regular
Join Date: Feb 2000
Location: Western, MA
Status: Offline
Reply With Quote
May 12, 2003, 11:59 AM
 
You could tell the novices to use PICO, it is much easier. I can't remember if it is on the machines by default. It is on mine but I cant remember if I had to install it or not.
     
Stratus Fear
Senior User
Join Date: Dec 2002
Location: Atlanta, GA
Status: Offline
Reply With Quote
May 12, 2003, 12:01 PM
 
Originally posted by SpinCycle:
You could tell the novices to use PICO, it is much easier. I can't remember if it is on the machines by default. It is on mine but I cant remember if I had to install it or not.
It's on X by default, but not most Linux distros that I've used. Of course, I was too lazy to go get it and compile it when I installed Mandrake, and then somehow forgot it existed. That's not good
     
   
 
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 09:47 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.,