logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Multiple Apache Instances for Control Panel
Author
webmasteroy



Joined: 10 Oct 2008
Posts: 2
Location: Canada

PostPosted: Fri 10 Oct '08 21:54    Post subject: Multiple Apache Instances for Control Panel Reply with quote

Hello,

I am a fast learning linux noobie, I just setup a Ubuntu Server edition on an old PC on my LAN I got everything working (I.E. Apache2, PHP5, Perl, MySQL, ftp, Outgoing mailserver etc....) that mail server was a real b*tch I had to set it up to use gmail as a smart host.

So my current server configuration handles multiple users with symbolic links.

/var/www/user-administrator --> /home/administrator/www
/var/www/user-brandon --> /home/brandon/www
/var/www/user-neil --> /home/neil/www

I was looking up on vhost for this exact problem I am having, and I see what I have done isn't exactly how most people would have done it so I will probably fix up that structuring using vhosts later.

So what I am trying to do:

I am want to run a second installation of Apache as the root user. Now before you scream at me about that not being safe let me explain!

I plan on creating a Control Panel similar to Webmin or cPanel or Direct Admin. But this would use php as its engine. Now you can't execute certain commands like shell_exec("useradd -u....."); because Apache doesn't run as the root user and only root permissions can execute functions like that.

This is why I would like to install a separate installation of Apache on a port other than that of 80 maybe 5555 or something not used by other software that I might be using.

Please let me know if this is possible, I have searched the web for a while trying to find anything on this and I can't, so maybe I am going about this wrong.

As I said I am a newbie to this linux so maybe software like Webmin and cPanel do this totally different to my knowledge they use Shell Scripts or Perl or Python and I know Python and Shell Scripts can easily be run as a root user.

But I would like to have these functions be executed via php's shell_exec(); or exec(); commands.

Kind Regards,
Aaron
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Sat 11 Oct '08 18:20    Post subject: Reply with quote

There is already a tool in PHP which can do stuff like you want.
http://www.syscp.de/
I think it is easy to create such a panel by yourself. But why invent the wheel a second time?


A second thing, even when your run your apache NOT as root, you can put it into the wheel group and run commands with sudo.
But as all others I recommend you to run not apache as root.

at third why did you choose a windows apache forum for your questions?


If you still have a question please post again!
Back to top
webmasteroy



Joined: 10 Oct 2008
Posts: 2
Location: Canada

PostPosted: Sat 11 Oct '08 18:41    Post subject: Reply with quote

I was just posting everywhere Razz, I realize I shouldn't reinvent the wheel but I am working on my own web configuration, as such I want to use my own very simple panel.

(I can't find any free runs that actually work, properly.)

And I didn't realize this was a windows forum, I apologize I was just trying to post everywhere I could find that talked about apache.
Back to top


Reply to topic   Topic: Multiple Apache Instances for Control Panel View previous topic :: View next topic
Post new topic   Forum Index -> Apache