Kfkm09
asked on
How to Change Ports on Apache
Hi,
I'm new to Apache for Mac OS X and I'd like to know how to change the port from the default, (80). I don't know where any of the program files are, so guiding me through the directories would help.
Thanks,
Erik
I'm new to Apache for Mac OS X and I'd like to know how to change the port from the default, (80). I don't know where any of the program files are, so guiding me through the directories would help.
Thanks,
Erik
Your Apache config file should be located at: /etc/httpd/httpd.conf. Edit the file, and change the line "Port 80" to the port you want and restart httpd should be fine.
ASKER
Thanks. Could you tell me where the etc folder is?
ooh... sorry, you have to open up your terminal. Then do this:
1) Type: "vi /etc/httpd/httpd.conf" without the quote and press <Return>
2) The vi editor will open up the file and you will see the httpd.conf file content. Then type: "/Port" and press <Return>
3) Move your cursor using <Arrow Keys> to '8' on the line Port 80. Then press 'x' two time to remove the 80.
4) Press Shift-'A' (that's a capital 'A') and type in the port number you want to use (e.g. 1234).
5) Press <Esc> key and then Shift-"ZZ" (that's two capital 'Z') and you are done editing the httpd.conf file.
It might be a good idea to learn some vi command before proceeding (search for "vi tutorial" on Google).
1) Type: "vi /etc/httpd/httpd.conf" without the quote and press <Return>
2) The vi editor will open up the file and you will see the httpd.conf file content. Then type: "/Port" and press <Return>
3) Move your cursor using <Arrow Keys> to '8' on the line Port 80. Then press 'x' two time to remove the 80.
4) Press Shift-'A' (that's a capital 'A') and type in the port number you want to use (e.g. 1234).
5) Press <Esc> key and then Shift-"ZZ" (that's two capital 'Z') and you are done editing the httpd.conf file.
It might be a good idea to learn some vi command before proceeding (search for "vi tutorial" on Google).
ASKER
That worked. Thanks again. I have one more question, so I raised the point value.
What would I type in the terminal to setup Apache as a proxy server?
What would I type in the terminal to setup Apache as a proxy server?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
of course, if you are determine to use mod_proxy. The documentation is at: http://httpd.apache.org/docs/1.3/mod/mod_proxy.html