Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache and Root- Can i have one user running as root?

Status
Not open for further replies.

andy7t

Programmer
Nov 11, 2003
21
GB
Hi,

I am trying to make a few perl scripts to adminsister my server with.
Unfortuantly, lots of them need root access.
Is there anyway to run just one VIRTUALHOST in apache as root, and the rest as normal?

 
First of all, the answer to your question is, you can run two different processes, one as root, but they'll have to run on different ports.

That said, I would seriously recommend against running apache as root. It's simply too large and complicated to be assured of security. In addition, it's popularity makes it a target for hackers.

It'd be far better to use something to write a simple HTTP Server and run your scripts from it. Far less code to subvert. Look at the Python SimpleHTTPServer and BaseHTTPServer classes. You can extend them and have pages up and running in a dozen lines of code.
 
I can write Perl, and i know i can write one in there.

I tried it a while back, and it kind of worked. I got it to serve pages one at a time, but when it came to loading images at the same time, it couldn't.
Also, i have difficulty using the CGI module to grab input from forms when using my webserver.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top