cheese510
cheese510

Reputation: 81

How to execute a script on a server from a webpage?

I want to run a shell script off my VPS through a website to start and stop a service. I have a script i currently execute by puttying in and typing ctf.sh. I had a look at using CGI and stuff, however this has left me thoroughly confused. On my VPS my web folder is ofcourse /var/www so where would i find the cgi-bin folder and how would i go about runing such things? Sorry for such a stupid question :S

Upvotes: 4

Views: 196

Answers (1)

Tudor Constantin
Tudor Constantin

Reputation: 26871

You could execute your script like:

exec('/path/to/your/script.sh');

Upvotes: 4

Related Questions