![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Web Programming, Web 2.0 and Mashups Discuss Web Programming and Web Server Administration, including LAMP, Apache, MySQL, Flash, HTML, SEO, Mashups and other Web APIs and topics. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Need help with cgi and so on
Hello all, i`m new here and new in programming with cgi. But i need it for my running project. I`ve googled half a week with no success.
All i need is to run an .sh-file via cgi. My file is stored in /home/bots/ but if i try Code:
#!/bin/sh echo 'Content-type: text/html' echo echo '<html>' echo '<body>' echo '<center><h1>' /home/bots/logout.sh echo '</h1></center>' echo '</body>' echo '</html>' No screen session found. But i`m sure there is running a session. if i log in into the shell all is working fine. |
|
|||||
|
Normally with Apache server you must configure the CGI directives and directory. There are rules where the CGI directory can reside.
My first guess is that you have not configured Apache correctly to run CGI scripts and that you can't run CGI in your /home/bots/ directory. Take a look at this page from Apache, Configuring Apache to permit CGI. |
|
||||
|
Ok, done all but no success.
I would make all new if someone can give me step by step instructions. All i wanne do is to run an .exe-file in an screen session. start it with: mono my.exe This programm should run in an screen - session. And now i want to send commands to this programm. The commands should come from web. ![]() ---------- Post updated at 01:44 PM ---------- Previous update was at 07:50 AM ---------- Ok, forget my previos post. I have played a litte and found something that makes me wonder. My logut.cgi Code:
#!/bin/sh echo 'Content-type: text/html' echo echo '<html>' echo '<body>' echo '<center><h1>' sudo -u username /home/bots/logout.sh echo '</h1></center>' echo '</body>' echo '</html>' Code:
username ALL=(ALL) NOPASSWD: /home/bots/logout.sh Code:
[Sun Nov 01 17:13:25 2009] [error] [client ***.***.***.***] usernames's password: Last edited by cryp0r; 3 Weeks Ago at 02:52 PM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|