LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-02-2005, 04:42 AM   #1
chibi
Member
 
Registered: Aug 2004
Location: Canada
Distribution: Debian
Posts: 62

Rep: Reputation: 15
Apache, suexec, virtual hosts, and executing a file/shell script :\


Hello,

I recently bought a server so I can host some unpopular freeware game servers for a community im involved in and I am giving some people their own accounts to run their servers from.

The server I have comes with Direct Admin as a control panel.. and it has apache 1.3.33 (installed and working fine) with suexec (as far as i know). Inside Direct Admin there is an area that lets me edit the virtual hosts...

What I have done is coded a new area in the control panel using php that lets them manage their servers. I have given them links to start/stop their servers. But the problem is, when they click them it wont send them to the new page that is located within their personal directories.

And I have finally figured out that I need to do this virtual host thing in order to do that.. but I am completely oblivious as to how. I have read the documentation on Apache and LinuxPlanet but I just dont get it

So while they are logged into the control panel, the address looks like this (I put a space in the post here so it doesnt turn into a link):

h ttp://thedomain.com:4444/CMD_PLUGINS/servers_management

When they click the link:

<a href="/home/testuser/testserver/start.php">start server</a>

It brings them to:

ht tp://thedomain.com:4444/home/testuser/testserver/start.php
and says page not found. - it exists, and has ugo=rwx for now.
(right now all that start.php does is just echo saying its there until i know it works)

So what do I have to do to get this to work properly?

when I get it working, the start.php file it opens will have a:


<?php
shell_exec('./start.sh');
?>

type deal in it...and then the start.sh will take it from there.

I dont even know if thats correct but I havent been able to get that far yet

Is this the right approach or should I be using cgi or what?

Its all confusing...It would be nice if the actions of start.sh would echo back to the page they are using to browse but I dont know if it will since the php is telling it to open independently (i think) and the browser isnt the terminal so..

but yeah my main issue though is this virtual host thing.. how do I set it up so that the person in the control panel can execute stuff in their home directories?

Thank you for your help I appreciate it.

Last edited by chibi; 05-02-2005 at 05:05 AM.
 
Old 05-02-2005, 01:17 PM   #2
chibi
Member
 
Registered: Aug 2004
Location: Canada
Distribution: Debian
Posts: 62

Original Poster
Rep: Reputation: 15
bump^ :\
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories jerryasher Linux - Software 7 02-18-2007 07:29 AM
apache virtual hosts smaida Linux - Software 3 06-20-2004 05:28 PM
Apache 2 Suexec PHP and Virtual Hosts codedv Linux - Software 2 02-26-2004 05:56 PM
Virtual Hosts with Apache noripcord7 Linux - Games 1 02-22-2004 11:33 PM
Webmin Vitualmin SUEXEC Apache Virtual Named Based Server Setup Questions ? Confused! wishiwas Linux - Software 0 12-02-2003 10:47 PM


All times are GMT -5. The time now is 08:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration