Обеспечение обычных пользователей (некорневых) с инициализацией и завершением работы, автоматически выполняет возможности

Некоторая запутавшаяся терминология, здесь. "Хосты" в файле hosts обращаются к статически определенным определениям адреса имени к числу. Так, например, Вы будете видеть строку там, которая определяет localhost как 127.0.0.1 (и возможно ::1, В зависимости от версии для Windows).

VirtualHosts в апаче, с другой стороны, обращаются к методу конфигурации в Apache, где Вы подаете различные веб-страницы в зависимости от свойств входящего запроса; особенно, порт, что соединение входит на и Host заголовок присоединяется к запросу.

Таким образом конфигурация Apache может, например, подать отдельный набор страниц для нескольких различных доменов; например, преподнося другую группу страниц, когда www.domain.com требуется по сравнению с когда info.domain.com требуется. Документация Apache является хорошим обзором VirtuaHosts.

Надежда это помогает разрешить вещи.

7
задан 13 April 2017 в 15:14
1 ответ

I agree that your solution seems a bit complex, so I'll go with "give me some idea how this could be implemented in an entirely different way" :-)

  1. The standard solution for this is to use a configuration management system, such as puppet, and allow users to add their stuff to the puppet config for the server. Puppet will then push out the start script and add them to the relevant runlevels.

  2. A quicker way would be to give them sudoedit access to /etc/rc.d/rc.local and add their things there.

  3. Or give them each a directory to put the start scripts they want started, and have a cron job copy those scripts to /etc/init.d, inserting su $USER -c at suitable places and run chkconfig on them.

  4. Or give them each a directory to put the start scripts, and add some lines at the end fo /etc/rc.d/rc.local to go through those directories and run edited su $USER -c 'script start' on each script in them.

Edited to add: 5. Let them use crontab to schedule the jobs to be run @reboot

8
ответ дан 2 December 2019 в 23:35

Теги

Похожие вопросы