R
R
Rafail Dunyashev2016-10-02 19:19:44
Nginx
Rafail Dunyashev, 2016-10-02 19:19:44

How to make nginx restart on a website (PHP, Yii2)?

In other words, how NOT from the console, for example, when you click on a button, send a request, perform a certain action, reload nginx?
Those how to make control of the basic commands of the nginx server from the site?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Shatokhin, 2016-10-02
@Sovigod

shell_exec and properly configured sudoers with permission for "sudo -u root $cmd" to work without requiring a password from the user executing the code.

R
Roman Basharin, 2016-10-04
@Hellek

exec() function

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question