Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Programming/Scripts

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 21st September 2009, 23:00
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,033
Thanks: 261
Thanked 147 Times in 128 Posts
Default Apache and open a low socket?

I'm trying to open a socket below 1024 with Apache2 and PHP.
Problem is that ports below 1024 can not be opened by Apache running as "nobody".

I could run Apache as root, but do not really want to do this (for obvious reasons)

Is there any other way to get Apache to open sockets below 1024?
Reply With Quote
The Following User Says Thank You to edge For This Useful Post:
nasanet (14th October 2009)
Sponsored Links
  #2  
Old 22nd September 2009, 16:15
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

You cannot run Apache as root (unless you compile it with some special options) - that's a security measure.

I'm not sure how this can be done...
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
nasanet (14th October 2009)
  #3  
Old 22nd September 2009, 17:08
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,033
Thanks: 261
Thanked 147 Times in 128 Posts
Default

For now I've created an iptable to redirect the "low" port to a "high" one, and it looks like it's working :-)
Reply With Quote
The Following User Says Thank You to edge For This Useful Post:
nasanet (14th October 2009)
  #4  
Old 10th October 2009, 07:53
mdjhomes mdjhomes is offline
Junior Member
 
Join Date: Oct 2009
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
 
Default

Thanks for this site very helpful.
Reply With Quote
The Following User Says Thank You to mdjhomes For This Useful Post:
nasanet (14th October 2009)
Reply

Bookmarks

Thread Tools
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
Apache 2 will not start. Unable to open logs auMark Installation/Configuration 19 15th September 2011 09:20
apache wont start after deleting a site tellar Installation/Configuration 1 2nd October 2008 15:34
Apache won't start: "Too many files error"? bpmee Server Operation 4 31st July 2007 13:37
Apache default page can't be visited satimis Server Operation 2 6th April 2007 11:55
Howto suggestion suse PhP ver 4 + Ver 5 wwparrish Suggest HOWTO 11 7th August 2006 13:29


All times are GMT +2. The time now is 22:27.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.